From e35fc400dd0c5ac89b4ab85c03657d59d9df577e Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 21 Apr 2015 21:00:18 +0200 Subject: [PATCH] Make sure to handle debugging 'invalid' indices * Crash upload fix * If a vertex is the strip restart index (displayed as "-1") or is reading out of bounds of the index buffer (displayed as "-") then we should still allow vertex debugging to go ahead, as if the index were just 0. --- renderdocui/Windows/BufferViewer.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/renderdocui/Windows/BufferViewer.cs b/renderdocui/Windows/BufferViewer.cs index 2c390283e..cad30ed4a 100644 --- a/renderdocui/Windows/BufferViewer.cs +++ b/renderdocui/Windows/BufferViewer.cs @@ -2840,7 +2840,12 @@ namespace renderdocui.Windows if (row >= ui.m_Rows.Length || ui.m_Rows[row].Length <= 1) return; - UInt32 idx = (UInt32)ui.m_Rows[row][1]; + UInt32 idx = 0; + + if (ui.m_Rows[row][1] is UInt32) + { + idx = (UInt32)ui.m_Rows[row][1]; + } var draw = m_Core.CurDrawcall;