From 5444c4b3ab5acc29b6b85fd4029ee24603004f5f Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 29 Dec 2018 12:04:49 +0000 Subject: [PATCH] Treat Op(Member)DecorateStringGOOGLE as part of the annotation section Fixes a crash in the driver on RADV when compiling the PostVS shader for a shader that has these opcodes. The incorrect section boundaries was causing BuiltIn decorations to not be stripped. --- renderdoc/driver/shaders/spirv/spirv_editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_editor.cpp b/renderdoc/driver/shaders/spirv/spirv_editor.cpp index 9677e5c75..4a2856820 100644 --- a/renderdoc/driver/shaders/spirv/spirv_editor.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_editor.cpp @@ -201,7 +201,8 @@ SPIRVEditor::SPIRVEditor(std::vector &spirvWords) : spirv(spirvWords) } else if(opcode == spv::OpDecorate || opcode == spv::OpMemberDecorate || opcode == spv::OpGroupDecorate || opcode == spv::OpGroupMemberDecorate || - opcode == spv::OpDecorationGroup) + opcode == spv::OpDecorationGroup || opcode == spv::OpDecorateStringGOOGLE || + opcode == spv::OpMemberDecorateStringGOOGLE) { START_SECTION(SPIRVSection::Annotations); }