From 96f11095da7f7f9665b54aebaeeec671235594d8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 31 Mar 2017 15:15:20 +0100 Subject: [PATCH] Change type of FrameStatistics::recorded to bool32 to be more accurate --- qrenderdoc/Windows/StatisticsViewer.cpp | 4 ++-- renderdoc/api/replay/data_types.h | 2 +- renderdoc/driver/d3d11/d3d11_device.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qrenderdoc/Windows/StatisticsViewer.cpp b/qrenderdoc/Windows/StatisticsViewer.cpp index 3a150403d..c5c7e7e2b 100644 --- a/qrenderdoc/Windows/StatisticsViewer.cpp +++ b/qrenderdoc/Windows/StatisticsViewer.cpp @@ -587,7 +587,7 @@ void AppendOutputStatistics(QString &statisticsLog, const FetchFrameInfo &frameI void AppendDetailedInformation(CaptureContext &ctx, QString &statisticsLog, const FetchFrameInfo &frameInfo) { - if(frameInfo.stats.recorded == 0) + if(!frameInfo.stats.recorded) return; AppendDrawStatistics(statisticsLog, frameInfo); @@ -626,7 +626,7 @@ void CountContributingEvents(const FetchDrawcall &draw, uint32_t &drawCount, QString AppendAPICallSummary(const FetchFrameInfo &frameInfo, uint numAPICalls) { - if(frameInfo.stats.recorded == 0) + if(!frameInfo.stats.recorded) return ""; uint numConstantSets = 0; diff --git a/renderdoc/api/replay/data_types.h b/renderdoc/api/replay/data_types.h index 74431395f..6a1c3e862 100644 --- a/renderdoc/api/replay/data_types.h +++ b/renderdoc/api/replay/data_types.h @@ -267,7 +267,7 @@ struct FetchFrameOutputStats struct FetchFrameStatistics { - uint32_t recorded; + bool32 recorded; FetchFrameConstantBindStats constants[ENUM_ARRAY_SIZE(ShaderStage)]; FetchFrameSamplerBindStats samplers[ENUM_ARRAY_SIZE(ShaderStage)]; FetchFrameResourceBindStats resources[ENUM_ARRAY_SIZE(ShaderStage)]; diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp index 576644aaa..0e7a27291 100644 --- a/renderdoc/driver/d3d11/d3d11_device.cpp +++ b/renderdoc/driver/d3d11/d3d11_device.cpp @@ -1106,7 +1106,7 @@ void WrappedID3D11Device::Serialise_CaptureScope(uint64_t offset) RDCEraseEl(stats); // #mivance GL/Vulkan don't set this so don't get stats in window - stats.recorded = 1; + stats.recorded = true; for(uint32_t stage = uint32_t(ShaderStage::First); stage < uint32_t(ShaderStage::Count); stage++) {