Fix Vulkan Wireframe overlay fallback when fillModeNonSolid is false

Change the RenderState properties after calling PatchLineStripIndexBuffer()
Mark the draw as an Indexed action
This commit is contained in:
Jake Turner
2026-03-02 09:12:37 +00:00
parent baec22490f
commit bb4baec204
+4 -2
View File
@@ -1268,7 +1268,6 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
if(ia)
ia->topology = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
state.primitiveTopology = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
// thankfully, primitive restart is always supported! This makes the index buffer a bit
// more
@@ -1276,10 +1275,12 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
// three lines, instead we have a single restart index after each triangle.
if(ia)
ia->primitiveRestartEnable = true;
state.primRestartEnable = true;
GetDebugManager()->PatchLineStripIndexBuffer(mainDraw, patchedIB, patchedIndexCount);
state.primitiveTopology = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
state.primRestartEnable = true;
if(m_pDriver->ShaderObject())
state.dynamicStates[VkDynamicLineWidth] = true;
}
@@ -1433,6 +1434,7 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
action.numIndices = patchedIndexCount;
action.baseVertex = 0;
action.indexOffset = 0;
action.flags |= ActionFlags::Indexed;
m_pDriver->ReplayDraw(cmd, action);
state.EndRenderPass(cmd);