From 1f2af20458e0ca873dfca3645a36dd81f7910895 Mon Sep 17 00:00:00 2001 From: Jonathan Glines Date: Wed, 21 Dec 2022 13:56:31 -0500 Subject: [PATCH] Fix VS2015 compile errors for NvPerfUtility headers All of these compile errors are from implicit bool conversions. --- .../redist/NvPerfUtility/include/NvPerfPeriodicSamplerGpu.h | 4 ++-- .../redist/NvPerfUtility/include/NvPerfRangeProfilerD3D11.h | 4 ++-- .../redist/NvPerfUtility/include/NvPerfRangeProfilerD3D12.h | 4 ++-- .../NvPerfUtility/include/NvPerfRangeProfilerOpenGL.h | 6 +++--- .../NvPerfUtility/include/NvPerfRangeProfilerVulkan.h | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfPeriodicSamplerGpu.h b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfPeriodicSamplerGpu.h index d9625aba0..0ebfa77e8 100644 --- a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfPeriodicSamplerGpu.h +++ b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfPeriodicSamplerGpu.h @@ -477,7 +477,7 @@ namespace nv { namespace perf { namespace sampler { } totalSize = getRecordBufferStatusParams.totalSize; usedSize = getRecordBufferStatusParams.usedSize; - overflow = getRecordBufferStatusParams.overflow; + overflow = !!getRecordBufferStatusParams.overflow; return true; } @@ -508,7 +508,7 @@ namespace nv { namespace perf { namespace sampler { return false; } numSamplingRangesDecoded = decodeCountersParams.numRangesDecoded; - recordBufferOverflow = decodeCountersParams.recordBufferOverflow; + recordBufferOverflow = !!decodeCountersParams.recordBufferOverflow; numSamplesDropped = decodeCountersParams.numSamplesDropped; numSamplesMerged = decodeCountersParams.numSamplesMerged; return true; diff --git a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D11.h b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D11.h index 9921fba94..d16159576 100644 --- a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D11.h +++ b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D11.h @@ -176,8 +176,8 @@ namespace nv { namespace perf { namespace profiler { return false; } - onePassDecoded = decodeParams.onePassCollected; - allPassesDecoded = decodeParams.allPassesCollected; + onePassDecoded = !!decodeParams.onePassCollected; + allPassesDecoded = !!decodeParams.allPassesCollected; return true; } diff --git a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D12.h b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D12.h index 8ac694e79..6eca8a343 100644 --- a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D12.h +++ b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerD3D12.h @@ -184,8 +184,8 @@ namespace nv { namespace perf { namespace profiler { return false; } - onePassDecoded = decodeParams.onePassCollected; - allPassesDecoded = decodeParams.allPassesCollected; + onePassDecoded = !!decodeParams.onePassCollected; + allPassesDecoded = !!decodeParams.allPassesCollected; return true; } diff --git a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerOpenGL.h b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerOpenGL.h index 34670407b..ce7f26f1c 100644 --- a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerOpenGL.h +++ b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerOpenGL.h @@ -179,8 +179,8 @@ namespace nv { namespace perf { namespace profiler { return false; } - onePassDecoded = decodeParams.onePassCollected; - allPassesDecoded = decodeParams.allPassesCollected; + onePassDecoded = !!decodeParams.onePassCollected; + allPassesDecoded = !!decodeParams.allPassesCollected; return true; } @@ -231,7 +231,7 @@ namespace nv { namespace perf { namespace profiler { bool IsInSession() const { - return m_profilerApi.pGraphicsContext; + return !!m_profilerApi.pGraphicsContext; } bool IsInPass() const diff --git a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerVulkan.h b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerVulkan.h index ca103e1c1..e54d6c292 100644 --- a/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerVulkan.h +++ b/renderdoc/driver/ihv/nv/official/PerfSDK/redist/NvPerfUtility/include/NvPerfRangeProfilerVulkan.h @@ -269,8 +269,8 @@ namespace nv { namespace perf { namespace profiler { return false; } - onePassDecoded = decodeParams.onePassCollected; - allPassesDecoded = decodeParams.allPassesCollected; + onePassDecoded = !!decodeParams.onePassCollected; + allPassesDecoded = !!decodeParams.allPassesCollected; return true; }