From c0b992f643e140f0365a86b4e5d4e97082c30741 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 27 May 2024 16:21:10 +0100 Subject: [PATCH] Don't try to disassemble textures that are declared as struct members * These are dummy members are not really contained in cbuffers or other structs, but dxc emits them anyway. --- renderdoc/driver/shaders/dxil/dxil_reflect.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renderdoc/driver/shaders/dxil/dxil_reflect.cpp b/renderdoc/driver/shaders/dxil/dxil_reflect.cpp index 0b7ded759..37f3d13b8 100644 --- a/renderdoc/driver/shaders/dxil/dxil_reflect.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_reflect.cpp @@ -1099,6 +1099,10 @@ static DXBC::CBufferVariableType MakeCBufferVariableType(const TypeInfo &typeInf if(IsEmptyStruct(t)) return ret; + // textures declared in a struct that becomes a global uniform could end up here, treat it as an empty struct. + if(ret.name.beginsWith("Texture2D<")) + return ret; + auto it = typeInfo.structData.find(t); if(it == typeInfo.structData.end())