From 711f4aadf671e2f1eb5ee2131041b6c81e27bbad Mon Sep 17 00:00:00 2001 From: baldurk Date: Sat, 28 Jun 2014 12:52:16 +0100 Subject: [PATCH] Print error first for unsupported operand, and check name is valid * Got a crash report here but from the minidump can't see what's wrong. It was debugging a compute shader which shouldn't have outputs. --- renderdoc/driver/d3d11/shaders/dxbc_debug.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp b/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp index 0bf4d9353..2f2bdc23d 100644 --- a/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp +++ b/renderdoc/driver/d3d11/shaders/dxbc_debug.cpp @@ -563,10 +563,12 @@ void State::SetDst(const ASMOperand &dstoper, const ASMOperation &op, const Shad } default: { + RDCERR("Currently unsupported destination operand type %d!", dstoper.type); + string name = dstoper.toString(); for(int32_t i=0; i < outputs.count; i++) { - if(!strcmp(name.c_str(), outputs[i].name.elems)) + if(outputs[i].name.elems && !strcmp(name.c_str(), outputs[i].name.elems)) { v = &outputs[i]; break; @@ -576,7 +578,6 @@ void State::SetDst(const ASMOperand &dstoper, const ASMOperation &op, const Shad if(v) break; - RDCERR("Currently unsupported destination operand type %d!", dstoper.type); break; } }