mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Convert GPU Time counter correctly
This commit is contained in:
@@ -134,7 +134,16 @@ void VulkanReplay::convertKhrCounterResult(CounterResult &rdcResult,
|
||||
if(khrUnit == VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR)
|
||||
{
|
||||
RDCASSERT(type == CompType::Double);
|
||||
rdcResult.value.d /= 1000.0 * 1000.0 * 1000.0;
|
||||
|
||||
if((khrStorage == VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR) ||
|
||||
(khrStorage == VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR))
|
||||
{
|
||||
rdcResult.value.d = rdcResult.value.d / (1000.0 * 1000.0 * 1000.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
rdcResult.value.d = (double)(rdcResult.value.u64) / (1000.0 * 1000.0 * 1000.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user