From 6c87445a03c615434e06ca94ed08fed2884a922c Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 31 Jan 2025 13:54:51 +0000 Subject: [PATCH] Don't scissor shaderOut in pixel history * This is not strictly necessary, just reduced wasted GPU work, but potentially this could affect accurate output for these values. We only need to scissor for cases where we're doing counters for checking writes and test passes. --- renderdoc/driver/d3d12/d3d12_pixelhistory.cpp | 11 ----------- renderdoc/driver/vulkan/vk_pixelhistory.cpp | 9 --------- 2 files changed, 20 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp index 881db1c62..9a70133c2 100644 --- a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp +++ b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp @@ -2083,17 +2083,6 @@ struct D3D12PixelHistoryPerFragmentCallback : D3D12PixelHistoryCallback PerFragmentPipelines pipes = CreatePerFragmentPipelines(state, eid, 0, renderTargetIndex); - for(uint32_t i = 0; i < state.views.size(); i++) - { - ScissorToPixel(state.views[i], state.scissors[i]); - - // Set scissor to the whole pixel quad - state.scissors[i].left &= ~0x1; - state.scissors[i].top &= ~0x1; - state.scissors[i].right = state.scissors[i].left + 2; - state.scissors[i].bottom = state.scissors[i].top + 2; - } - ID3D12PipelineState *psosIter[2]; psosIter[0] = pipes.primitiveIdPipe; psosIter[1] = pipes.shaderOutPipe; diff --git a/renderdoc/driver/vulkan/vk_pixelhistory.cpp b/renderdoc/driver/vulkan/vk_pixelhistory.cpp index daf885ede..f2e00dfdc 100644 --- a/renderdoc/driver/vulkan/vk_pixelhistory.cpp +++ b/renderdoc/driver/vulkan/vk_pixelhistory.cpp @@ -3140,15 +3140,6 @@ struct VulkanPixelHistoryPerFragmentCallback : VulkanPixelHistoryCallback shads = CreatePerFragmentShaders(state, eid, colorOutputIndex); } - for(uint32_t i = 0; i < state.views.size(); i++) - { - ScissorToPixel(state.views[i], state.scissors[i]); - - state.scissors[i].offset.x &= ~0x1; - state.scissors[i].offset.y &= ~0x1; - state.scissors[i].extent = {2, 2}; - } - VkPipeline pipesIter[2]; pipesIter[0] = pipes.primitiveIdPipe; pipesIter[1] = pipes.shaderOutPipe;