Vulkan Depth Overlay fallback to non-stencil mask

Fallback if the depth copy does not handle the depth texture configuration
This commit is contained in:
Jake Turner
2023-12-03 21:00:34 +00:00
parent a6529bd1bb
commit 0ef2210ab7
+14 -2
View File
@@ -1676,7 +1676,7 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
if(m_Overlay.m_DepthResolvePipeline[fmtIndex][sampleIndex] == 0)
{
RDCERR("Unhandled depth resolve format : %s", ToStr(dsNewFmt).c_str());
return ResourceId();
useDepthWriteStencilPass = false;
}
if(dsNewFmt != dsFmt)
{
@@ -1684,9 +1684,21 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
if(m_Overlay.m_DepthCopyPipeline[fmtIndex][sampleIndex] == 0)
{
RDCERR("Unhandled depth copy format : %s", ToStr(dsNewFmt).c_str());
return ResourceId();
useDepthWriteStencilPass = false;
needDepthCopyToDepthStencil = false;
}
}
// Currently depth-copy is only supported for Texture2D and Texture2DMS
if(dsFmt != dsNewFmt)
{
if(depthImageInfo.type != VK_IMAGE_TYPE_2D)
useDepthWriteStencilPass = false;
}
if(!useDepthWriteStencilPass)
{
RDCWARN("Depth overlay using fallback method instead of stencil mask");
dsNewFmt = dsFmt;
}
}
attDescs[1].format = dsNewFmt;