From bdead116ebbb125170aaea1af403a8dc83307521 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 3 Jun 2020 12:23:43 +0100 Subject: [PATCH] Handle NULL/out of bounds vertex buffer data in D3D11 shader debugging --- renderdoc/driver/d3d11/d3d11_shaderdebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp b/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp index d7f54f8f9..e3c4643d9 100644 --- a/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp +++ b/renderdoc/driver/d3d11/d3d11_shaderdebug.cpp @@ -1977,7 +1977,7 @@ ShaderDebugTrace *D3D11Replay::DebugVertex(uint32_t eventId, uint32_t vertid, ui } else { - if(size_t(fmt.compByteWidth * fmt.compCount) > dataSize) + if(srcData == NULL || size_t(fmt.compByteWidth * fmt.compCount) > dataSize) { state.inputs[i].value.u.x = state.inputs[i].value.u.y = state.inputs[i].value.u.z = 0; if(fmt.compType == CompType::UInt || fmt.compType == CompType::SInt)