From 2473e8aec59b58ed4a37b0038f7dfb4663a229d7 Mon Sep 17 00:00:00 2001 From: Jeremy Gebben Date: Mon, 31 Aug 2026 13:51:45 -0600 Subject: [PATCH] Fix IDX_VALUE() for non-indexed draws in PatchLineStripIndexBuffer Non indexed draws should use action->vertexOffset rather than action->baseVertex. Fixes VK_Overlay_Test, when running with KosmicKrisp. --- renderdoc/replay/replay_driver.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/renderdoc/replay/replay_driver.cpp b/renderdoc/replay/replay_driver.cpp index 252244e58..c2391b7c5 100644 --- a/renderdoc/replay/replay_driver.cpp +++ b/renderdoc/replay/replay_driver.cpp @@ -193,10 +193,15 @@ void PatchLineStripIndexBuffer(const ActionDescription *action, Topology topolog { const uint32_t restart = 0xffffffff; -#define IDX_VALUE(offs) \ - (idx16 ? idx16[index + (offs)] \ - : (idx32 ? idx32[index + (offs)] : (idx8 ? idx8[index + (offs)] : index + (offs)))) + \ - action->baseVertex + // For indexed draws the fetched index has baseVertex added to it. + // For non-indexed draws the index is generated and has vertexOffset added to it. + // clang-format off +#define IDX_VALUE(offs) \ + idx16 ? idx16[index + (offs)] + action->baseVertex \ + : idx32 ? idx32[index + (offs)] + action->baseVertex \ + : idx8 ? idx8[index + (offs)] + action->baseVertex \ + : index + (offs) + action->vertexOffset + // clang-format on switch(topology) {