mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-30 14:04:55 +00:00
Pm4 type 3 Event Write Impl
This commit is contained in:
parent
0ba9ea6a3b
commit
3545c8f1b1
@ -563,7 +563,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM4ItOpcode::EventWrite: {
|
case PM4ItOpcode::EventWrite: {
|
||||||
// const auto* event = reinterpret_cast<const PM4CmdEventWrite*>(header);
|
const auto* event = reinterpret_cast<const PM4CmdEventWrite*>(header);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM4ItOpcode::EventWriteEos: {
|
case PM4ItOpcode::EventWriteEos: {
|
||||||
@ -655,7 +655,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM4ItOpcode::AcquireMem: {
|
case PM4ItOpcode::AcquireMem: {
|
||||||
// const auto* acquire_mem = reinterpret_cast<PM4CmdAcquireMem*>(header);
|
const auto* acquire_mem = reinterpret_cast<const PM4CmdAcquireMem*>(header);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM4ItOpcode::Rewind: {
|
case PM4ItOpcode::Rewind: {
|
||||||
@ -919,7 +919,7 @@ Liverpool::Task Liverpool::ProcessCompute(const u32* acb, u32 acb_dwords, u32 vq
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM4ItOpcode::EventWrite: {
|
case PM4ItOpcode::EventWrite: {
|
||||||
// const auto* event = reinterpret_cast<const PM4CmdEventWrite*>(header);
|
const auto* event = reinterpret_cast<const PM4CmdEventWrite*>(header);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -282,12 +282,23 @@ enum class InterruptSelect : u32 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static u64 GetGpuClock64() {
|
static u64 GetGpuClock64() {
|
||||||
auto now = std::chrono::high_resolution_clock::now();
|
auto now = std::chrono::steady_clock::now();
|
||||||
auto duration = now.time_since_epoch();
|
auto duration = now.time_since_epoch();
|
||||||
auto ticks = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
|
auto ticks = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
|
||||||
return static_cast<u64>(ticks);
|
return static_cast<u64>(ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct PM4CmdEventWrite {
|
||||||
|
PM4Type3Header header;
|
||||||
|
u32 event_type;
|
||||||
|
u32 event_index;
|
||||||
|
u32 address_lo;
|
||||||
|
u32 address_hi;
|
||||||
|
u32 data_sel;
|
||||||
|
u32 int_sel;
|
||||||
|
u32 value;
|
||||||
|
};
|
||||||
|
|
||||||
struct PM4CmdEventWriteEop {
|
struct PM4CmdEventWriteEop {
|
||||||
PM4Type3Header header;
|
PM4Type3Header header;
|
||||||
union {
|
union {
|
||||||
@ -307,7 +318,7 @@ struct PM4CmdEventWriteEop {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T* Address() const {
|
T* Address() const {
|
||||||
return reinterpret_cast<T*>(address_lo | u64(address_hi) << 32);
|
return reinterpret_cast<T*>((u64(address_hi) << 32) | address_lo);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 DataDWord() const {
|
u32 DataDWord() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user