mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix KHR storage counter issue for time units
Renderdoc seems to somewhat require time units to be in float to be
able to present prettyfied results (ms/us/ns).
We were assuming that but a couple of errors slipped in :
* we were asserting that KHR time units are floats
* we didn't describe the renderdoc units as double (even though we
forced the conversion later on)
This commit is contained in:
committed by
Baldur Karlsson
parent
d2f7837ecf
commit
d88026a697
@@ -99,8 +99,6 @@ void VulkanReplay::convertKhrCounterResult(CounterResult &rdcResult,
|
||||
// Special case for time units, renderdoc only has a Seconds type.
|
||||
if(khrUnit == VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR)
|
||||
{
|
||||
RDCASSERT(type == CompType::Double);
|
||||
|
||||
if((khrStorage == VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR) ||
|
||||
(khrStorage == VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR))
|
||||
{
|
||||
@@ -204,6 +202,10 @@ CounterDescription VulkanReplay::DescribeCounter(GPUCounter counterID)
|
||||
GetKHRUnitDescription(khrCounter.unit, khrCounter.storage, rdcDesc.unit, rdcDesc.resultType,
|
||||
rdcDesc.resultByteWidth);
|
||||
|
||||
// Special chase for time units.
|
||||
if(khrCounter.unit == VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR)
|
||||
rdcDesc.resultType = CompType::Double;
|
||||
|
||||
return rdcDesc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user