diff --git a/renderdoc/driver/shaders/dxil/dxil_reflect.cpp b/renderdoc/driver/shaders/dxil/dxil_reflect.cpp index 890a8c196..f412146cb 100644 --- a/renderdoc/driver/shaders/dxil/dxil_reflect.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_reflect.cpp @@ -286,10 +286,19 @@ struct TypeInfo if(!typeAnnotations) return; - RDCASSERT(typeAnnotations->children.size() >= 2, typeAnnotations->children.size()); - const Metadata *structAnnotations = typeAnnotations->children[0]; + const Metadata *structAnnotations = NULL; - RDCASSERTEQUAL(getival(structAnnotations->children[0]), 0); + for(size_t i = 0; i < typeAnnotations->children.size(); i++) + { + if(getival(typeAnnotations->children[i]->children[0]) == 0) + { + structAnnotations = typeAnnotations->children[i]; + break; + } + } + + if(!structAnnotations) + return; for(size_t c = 1; c < structAnnotations->children.size(); c += 2) {