From 47f3f64fc78b0f5ce11cb759ca755f77056b857f Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 13 Jun 2018 13:22:11 +0100 Subject: [PATCH] Rename Samples Written to Samples Passed * This measure the number of samples that pass the depth/stencil tests - In the case of early tests, this means it doesn't account for shader discard before writing. --- renderdoc/api/replay/renderdoc_tostr.inl | 2 +- renderdoc/api/replay/replay_enums.h | 4 ++-- renderdoc/driver/d3d11/d3d11_counters.cpp | 12 ++++++------ renderdoc/driver/d3d12/d3d12_counters.cpp | 8 ++++---- renderdoc/driver/gl/gl_counters.cpp | 8 ++++---- renderdoc/driver/vulkan/vk_counters.cpp | 10 +++++----- renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/renderdoc/api/replay/renderdoc_tostr.inl b/renderdoc/api/replay/renderdoc_tostr.inl index b8311d8f1..5ae263fd3 100644 --- a/renderdoc/api/replay/renderdoc_tostr.inl +++ b/renderdoc/api/replay/renderdoc_tostr.inl @@ -703,7 +703,7 @@ std::string DoStringise(const GPUCounter &el) STRINGISE_ENUM_CLASS(GSPrimitives); STRINGISE_ENUM_CLASS(RasterizerInvocations); STRINGISE_ENUM_CLASS(RasterizedPrimitives); - STRINGISE_ENUM_CLASS(SamplesWritten); + STRINGISE_ENUM_CLASS(SamplesPassed); STRINGISE_ENUM_CLASS(VSInvocations); STRINGISE_ENUM_CLASS(HSInvocations); STRINGISE_ENUM_CLASS(DSInvocations); diff --git a/renderdoc/api/replay/replay_enums.h b/renderdoc/api/replay/replay_enums.h index 7288ff81f..6a132aa67 100644 --- a/renderdoc/api/replay/replay_enums.h +++ b/renderdoc/api/replay/replay_enums.h @@ -2699,7 +2699,7 @@ enumerated with IDs in the appropriate ranges. Number of primitives that were rendered. -.. data:: SamplesWritten +.. data:: SamplesPassed Number of samples that passed depth/stencil test. @@ -2772,7 +2772,7 @@ enum class GPUCounter : uint32_t GSPrimitives, RasterizerInvocations, RasterizedPrimitives, - SamplesWritten, + SamplesPassed, VSInvocations, HSInvocations, TCSInvocations = HSInvocations, diff --git a/renderdoc/driver/d3d11/d3d11_counters.cpp b/renderdoc/driver/d3d11/d3d11_counters.cpp index 774d46e04..b47bbae1e 100644 --- a/renderdoc/driver/d3d11/d3d11_counters.cpp +++ b/renderdoc/driver/d3d11/d3d11_counters.cpp @@ -41,7 +41,7 @@ vector D3D11Replay::EnumerateCounters() ret.push_back(GPUCounter::GSPrimitives); ret.push_back(GPUCounter::RasterizerInvocations); ret.push_back(GPUCounter::RasterizedPrimitives); - ret.push_back(GPUCounter::SamplesWritten); + ret.push_back(GPUCounter::SamplesPassed); ret.push_back(GPUCounter::VSInvocations); ret.push_back(GPUCounter::HSInvocations); ret.push_back(GPUCounter::DSInvocations); @@ -140,8 +140,8 @@ CounterDescription D3D11Replay::DescribeCounter(GPUCounter counterID) desc.resultType = CompType::UInt; desc.unit = CounterUnit::Absolute; break; - case GPUCounter::SamplesWritten: - desc.name = "Samples Written"; + case GPUCounter::SamplesPassed: + desc.name = "Samples Passed"; desc.description = "Number of samples that passed depth/stencil test."; desc.resultByteWidth = 8; desc.resultType = CompType::UInt; @@ -649,9 +649,9 @@ vector D3D11Replay::FetchCounters(const vector &count ret.push_back(CounterResult(ctx.timers[i].eventId, GPUCounter::CSInvocations, pipelineStats.CSInvocations)); break; - case GPUCounter::SamplesWritten: + case GPUCounter::SamplesPassed: ret.push_back( - CounterResult(ctx.timers[i].eventId, GPUCounter::SamplesWritten, occlusion)); + CounterResult(ctx.timers[i].eventId, GPUCounter::SamplesPassed, occlusion)); break; } } @@ -677,7 +677,7 @@ vector D3D11Replay::FetchCounters(const vector &count case GPUCounter::GSInvocations: case GPUCounter::PSInvocations: case GPUCounter::CSInvocations: - case GPUCounter::SamplesWritten: + case GPUCounter::SamplesPassed: ret.push_back( CounterResult(ctx.timers[i].eventId, d3dCounters[c], 0xFFFFFFFFFFFFFFFF)); break; diff --git a/renderdoc/driver/d3d12/d3d12_counters.cpp b/renderdoc/driver/d3d12/d3d12_counters.cpp index 2a5c19560..201a9b259 100644 --- a/renderdoc/driver/d3d12/d3d12_counters.cpp +++ b/renderdoc/driver/d3d12/d3d12_counters.cpp @@ -40,7 +40,7 @@ vector D3D12Replay::EnumerateCounters() ret.push_back(GPUCounter::GSPrimitives); ret.push_back(GPUCounter::RasterizerInvocations); ret.push_back(GPUCounter::RasterizedPrimitives); - ret.push_back(GPUCounter::SamplesWritten); + ret.push_back(GPUCounter::SamplesPassed); ret.push_back(GPUCounter::VSInvocations); ret.push_back(GPUCounter::HSInvocations); ret.push_back(GPUCounter::DSInvocations); @@ -125,8 +125,8 @@ CounterDescription D3D12Replay::DescribeCounter(GPUCounter counterID) desc.resultType = CompType::UInt; desc.unit = CounterUnit::Absolute; break; - case GPUCounter::SamplesWritten: - desc.name = "Samples Written"; + case GPUCounter::SamplesPassed: + desc.name = "Samples Passed"; desc.description = "Number of samples that passed depth/stencil test."; desc.resultByteWidth = 8; desc.resultType = CompType::UInt; @@ -648,7 +648,7 @@ vector D3D12Replay::FetchCounters(const vector &count case GPUCounter::GSPrimitives: result.value.u64 = pipeStats.GSPrimitives; break; case GPUCounter::RasterizerInvocations: result.value.u64 = pipeStats.CInvocations; break; case GPUCounter::RasterizedPrimitives: result.value.u64 = pipeStats.CPrimitives; break; - case GPUCounter::SamplesWritten: result.value.u64 = occl; break; + case GPUCounter::SamplesPassed: result.value.u64 = occl; break; case GPUCounter::VSInvocations: result.value.u64 = pipeStats.VSInvocations; break; case GPUCounter::HSInvocations: result.value.u64 = pipeStats.HSInvocations; break; case GPUCounter::DSInvocations: result.value.u64 = pipeStats.DSInvocations; break; diff --git a/renderdoc/driver/gl/gl_counters.cpp b/renderdoc/driver/gl/gl_counters.cpp index 2bf856de2..a62ea6299 100644 --- a/renderdoc/driver/gl/gl_counters.cpp +++ b/renderdoc/driver/gl/gl_counters.cpp @@ -76,7 +76,7 @@ vector GLReplay::EnumerateCounters() ret.push_back(GPUCounter::GSPrimitives); ret.push_back(GPUCounter::RasterizerInvocations); ret.push_back(GPUCounter::RasterizedPrimitives); - ret.push_back(GPUCounter::SamplesWritten); + ret.push_back(GPUCounter::SamplesPassed); ret.push_back(GPUCounter::VSInvocations); ret.push_back(GPUCounter::TCSInvocations); ret.push_back(GPUCounter::TESInvocations); @@ -163,8 +163,8 @@ CounterDescription GLReplay::DescribeCounter(GPUCounter counterID) desc.resultType = CompType::UInt; desc.unit = CounterUnit::Absolute; break; - case GPUCounter::SamplesWritten: - desc.name = "Samples Written"; + case GPUCounter::SamplesPassed: + desc.name = "Samples Passed"; desc.description = "Number of samples that passed depth/stencil test."; desc.resultByteWidth = 8; desc.resultType = CompType::UInt; @@ -244,7 +244,7 @@ GLenum glCounters[] = { eGL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB, // GPUCounter::GSPrimitives eGL_CLIPPING_INPUT_PRIMITIVES_ARB, // GPUCounter::RasterizerInvocations eGL_CLIPPING_OUTPUT_PRIMITIVES_ARB, // GPUCounter::RasterizedPrimitives - eGL_SAMPLES_PASSED, // GPUCounter::SamplesWritten + eGL_SAMPLES_PASSED, // GPUCounter::SamplesPassed eGL_VERTEX_SHADER_INVOCATIONS_ARB, // GPUCounter::VSInvocations eGL_TESS_CONTROL_SHADER_PATCHES_ARB, // GPUCounter::TCSInvocations eGL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB, // GPUCounter::TESInvocations diff --git a/renderdoc/driver/vulkan/vk_counters.cpp b/renderdoc/driver/vulkan/vk_counters.cpp index 050250df2..c2372ea8e 100644 --- a/renderdoc/driver/vulkan/vk_counters.cpp +++ b/renderdoc/driver/vulkan/vk_counters.cpp @@ -48,7 +48,7 @@ vector VulkanReplay::EnumerateCounters() } if(availableFeatures.occlusionQueryPrecise) - ret.push_back(GPUCounter::SamplesWritten); + ret.push_back(GPUCounter::SamplesPassed); if(availableFeatures.pipelineStatisticsQuery) { @@ -138,8 +138,8 @@ CounterDescription VulkanReplay::DescribeCounter(GPUCounter counterID) desc.resultType = CompType::UInt; desc.unit = CounterUnit::Absolute; break; - case GPUCounter::SamplesWritten: - desc.name = "Samples Written"; + case GPUCounter::SamplesPassed: + desc.name = "Samples Passed"; desc.description = "Number of samples that passed depth/stencil test."; desc.resultByteWidth = 8; desc.resultType = CompType::UInt; @@ -523,7 +523,7 @@ vector VulkanReplay::FetchCounters(const vector &coun case GPUCounter::GSInvocations: case GPUCounter::PSInvocations: case GPUCounter::CSInvocations: statsNeeded = true; break; - case GPUCounter::SamplesWritten: occlNeeded = true; break; + case GPUCounter::SamplesPassed: occlNeeded = true; break; default: break; } } @@ -633,7 +633,7 @@ vector VulkanReplay::FetchCounters(const vector &coun case GPUCounter::RasterizedPrimitives: result.value.u64 = m_PipeStatsData[i * 11 + 6]; break; - case GPUCounter::SamplesWritten: result.value.u64 = m_OcclusionData[i]; break; + case GPUCounter::SamplesPassed: result.value.u64 = m_OcclusionData[i]; break; case GPUCounter::VSInvocations: result.value.u64 = m_PipeStatsData[i * 11 + 2]; break; case GPUCounter::TCSInvocations: result.value.u64 = m_PipeStatsData[i * 11 + 8]; break; case GPUCounter::TESInvocations: result.value.u64 = m_PipeStatsData[i * 11 + 9]; break; diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp index 4b02c19cf..9924ee6d4 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp @@ -1765,7 +1765,7 @@ VkResult WrappedVulkan::vkCreateDevice(VkPhysicalDevice physicalDevice, if(availFeatures.occlusionQueryPrecise) enabledFeatures.occlusionQueryPrecise = true; else - RDCWARN("occlusionQueryPrecise = false, samples written counter will not work"); + RDCWARN("occlusionQueryPrecise = false, samples passed counter will not be available"); if(availFeatures.pipelineStatisticsQuery) enabledFeatures.pipelineStatisticsQuery = true;