summaryrefslogtreecommitdiff
path: root/thirdparty/glslang/SPIRV/disassemble.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/glslang/SPIRV/disassemble.cpp')
-rw-r--r--thirdparty/glslang/SPIRV/disassemble.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/thirdparty/glslang/SPIRV/disassemble.cpp b/thirdparty/glslang/SPIRV/disassemble.cpp
index 930e799493..a95ded49d2 100644
--- a/thirdparty/glslang/SPIRV/disassemble.cpp
+++ b/thirdparty/glslang/SPIRV/disassemble.cpp
@@ -75,6 +75,7 @@ enum ExtInstSet {
GLSLextAMDInst,
GLSLextNVInst,
OpenCLExtInst,
+ NonSemanticDebugPrintfExtInst,
};
// Container class for a single instance of a SPIR-V stream, with methods for disassembly.
@@ -480,8 +481,12 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
if (opCode == OpExtInst) {
ExtInstSet extInstSet = GLSL450Inst;
const char* name = idDescriptor[stream[word - 2]].c_str();
- if (0 == memcmp("OpenCL", name, 6)) {
+ if (strcmp("OpenCL.std", name) == 0) {
extInstSet = OpenCLExtInst;
+ } else if (strcmp("OpenCL.DebugInfo.100", name) == 0) {
+ extInstSet = OpenCLExtInst;
+ } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) {
+ extInstSet = NonSemanticDebugPrintfExtInst;
} else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 ||
strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 ||
strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 ||
@@ -505,6 +510,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
}
else if (extInstSet == GLSLextNVInst) {
out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
+ } else if (extInstSet == NonSemanticDebugPrintfExtInst) {
+ out << "(DebugPrintf)";
}
}
break;
@@ -512,6 +519,10 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
case OperandLiteralString:
numOperands -= disassembleString();
break;
+ case OperandVariableLiteralStrings:
+ while (numOperands > 0)
+ numOperands -= disassembleString();
+ return;
case OperandMemoryAccess:
outputMask(OperandMemoryAccess, stream[word++]);
--numOperands;