VK Depth Overlay use non-stencil mask approach by default

Only use stencil mask approach for depth exporting shaders.
The stencil mask approach does not show discarded pixels as passing.
This commit is contained in:
Jake Turner
2024-01-11 14:42:25 +00:00
parent b04560933e
commit efc30ca723
+18
View File
@@ -1644,6 +1644,24 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
if(overlay == DebugOverlay::Depth)
useDepthWriteStencilPass = true;
if(useDepthWriteStencilPass)
{
useDepthWriteStencilPass = false;
const VulkanCreationInfo::Pipeline::Shader &ps = pipeInfo.shaders[4];
if(ps.module != ResourceId())
{
ShaderReflection *reflection = ps.refl;
if(reflection)
{
for(SigParameter &output : reflection->outputSignature)
{
if(output.systemValue == ShaderBuiltin::DepthOutput)
useDepthWriteStencilPass = true;
}
}
}
}
VkAttachmentDescription attDescs[] = {
{0, overlayFormat, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_LOAD,
VK_ATTACHMENT_STORE_OP_STORE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,