From 1a93888999ce1d1630897041b95ccd9b97e062a4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 21 Jan 2020 16:03:14 +0000 Subject: [PATCH] If no vertex pick result is found in a single instance, return error * We don't want to return that no vertex was found in one particular instance, as that is misleading. --- renderdoc/replay/replay_output.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/renderdoc/replay/replay_output.cpp b/renderdoc/replay/replay_output.cpp index 619539c72..757089803 100644 --- a/renderdoc/replay/replay_output.cpp +++ b/renderdoc/replay/replay_output.cpp @@ -453,8 +453,12 @@ rdcpair ReplayOutput::PickVertex(uint32_t x, uint32_t y) } else { - return make_rdcpair(m_pDevice->PickVertex(m_EventID, m_Width, m_Height, cfg, x, y), - m_RenderData.meshDisplay.curInstance); + uint32_t vert = m_pDevice->PickVertex(m_EventID, m_Width, m_Height, cfg, x, y); + + if(vert != ~0U) + return make_rdcpair(vert, m_RenderData.meshDisplay.curInstance); + + return errorReturn; } }