SampleCountFlagBits::e16 - GetGpuClock64 (#360)
* SampleCountFlagBits::e16 * GpuClock64 * GpuClock64 * Update pm4_cmds.h * Update pm4_cmds.h
This commit is contained in:
parent
21462523de
commit
7308864537
|
@ -652,6 +652,13 @@ struct PM4CmdReleaseMem {
|
||||||
return data_lo | u64(data_hi) << 32;
|
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 {
|
void SignalFence(Platform::InterruptId irq_id) const {
|
||||||
switch (data_sel.Value()) {
|
switch (data_sel.Value()) {
|
||||||
case DataSelect::Data32Low: {
|
case DataSelect::Data32Low: {
|
||||||
|
@ -662,6 +669,10 @@ struct PM4CmdReleaseMem {
|
||||||
*Address<u64>() = DataQWord();
|
*Address<u64>() = DataQWord();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DataSelect::GpuClock64: {
|
||||||
|
*Address<u64>() = GetGpuClock64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DataSelect::PerfCounter: {
|
case DataSelect::PerfCounter: {
|
||||||
*Address<u64>() = Common::FencedRDTSC();
|
*Address<u64>() = Common::FencedRDTSC();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -681,6 +681,8 @@ vk::SampleCountFlagBits NumSamples(u32 num_samples) {
|
||||||
return vk::SampleCountFlagBits::e4;
|
return vk::SampleCountFlagBits::e4;
|
||||||
case 8:
|
case 8:
|
||||||
return vk::SampleCountFlagBits::e8;
|
return vk::SampleCountFlagBits::e8;
|
||||||
|
case 16:
|
||||||
|
return vk::SampleCountFlagBits::e16;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue