mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-19 13:08:27 +00:00
SampleCountFlagBits::e16 - GetGpuClock64 (#360)
* SampleCountFlagBits::e16 * GpuClock64 * GpuClock64 * Update pm4_cmds.h * Update pm4_cmds.h
This commit is contained in:
parent
aa9b70ae88
commit
25b9abec77
|
@ -652,6 +652,13 @@ struct PM4CmdReleaseMem {
|
|||
return data_lo | u64(data_hi) << 32;
|
||||
}
|
||||
|
||||
uint64_t GetGpuClock64() const {
|
||||
auto now = std::chrono::high_resolution_clock::now();
|
||||
auto duration = now.time_since_epoch();
|
||||
auto ticks = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
|
||||
return static_cast<uint64_t>(ticks);
|
||||
}
|
||||
|
||||
void SignalFence(Platform::InterruptId irq_id) const {
|
||||
switch (data_sel.Value()) {
|
||||
case DataSelect::Data32Low: {
|
||||
|
@ -662,6 +669,10 @@ struct PM4CmdReleaseMem {
|
|||
*Address<u64>() = DataQWord();
|
||||
break;
|
||||
}
|
||||
case DataSelect::GpuClock64: {
|
||||
*Address<u64>() = GetGpuClock64();
|
||||
break;
|
||||
}
|
||||
case DataSelect::PerfCounter: {
|
||||
*Address<u64>() = Common::FencedRDTSC();
|
||||
break;
|
||||
|
|
|
@ -681,6 +681,8 @@ vk::SampleCountFlagBits NumSamples(u32 num_samples) {
|
|||
return vk::SampleCountFlagBits::e4;
|
||||
case 8:
|
||||
return vk::SampleCountFlagBits::e8;
|
||||
case 16:
|
||||
return vk::SampleCountFlagBits::e16;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue