Browse Source

Updated spirv-tools.

Бранимир Караџић 3 years ago
parent
commit
a6eb053d68

+ 1 - 1
3rdparty/spirv-tools/include/generated/build-version.inc

@@ -1 +1 @@
-"v2021.5-dev", "SPIRV-Tools v2021.5-dev aa79ba8a396f8da0e5bed8c03e72cf0cfd99d2dc"
+"v2021.5-dev", "SPIRV-Tools v2021.5-dev ad6abbd669261cf3728d71e263d5d16f6c5f2b22"

+ 2 - 1
3rdparty/spirv-tools/include/generated/generators.inc

@@ -30,4 +30,5 @@
 {29, "Mikkosoft Productions", "MSP Shader Compiler", "Mikkosoft Productions MSP Shader Compiler"},
 {29, "Mikkosoft Productions", "MSP Shader Compiler", "Mikkosoft Productions MSP Shader Compiler"},
 {30, "SpvGenTwo community", "SpvGenTwo SPIR-V IR Tools", "SpvGenTwo community SpvGenTwo SPIR-V IR Tools"},
 {30, "SpvGenTwo community", "SpvGenTwo SPIR-V IR Tools", "SpvGenTwo community SpvGenTwo SPIR-V IR Tools"},
 {31, "Google", "Skia SkSL", "Google Skia SkSL"},
 {31, "Google", "Skia SkSL", "Google Skia SkSL"},
-{32, "TornadoVM", "SPIRV Beehive Toolkit", "TornadoVM SPIRV Beehive Toolkit"},
+{32, "TornadoVM", "SPIRV Beehive Toolkit", "TornadoVM SPIRV Beehive Toolkit"},
+{33, "DragonJoker", "ShaderWriter", "DragonJoker ShaderWriter"},

+ 6 - 0
3rdparty/spirv-tools/source/text.cpp

@@ -715,6 +715,12 @@ spv_result_t GetNumericIds(const spvtools::AssemblyGrammar& grammar,
   while (context.hasText()) {
   while (context.hasText()) {
     spv_instruction_t inst;
     spv_instruction_t inst;
 
 
+    // Operand parsing sometimes involves knowing the opcode of the instruction
+    // being parsed. A malformed input might feature such an operand *before*
+    // the opcode is known. To guard against accessing an uninitialized opcode,
+    // the instruction's opcode is initialized to a default value.
+    inst.opcode = SpvOpMax;
+
     if (spvTextEncodeOpcode(grammar, &context, &inst)) {
     if (spvTextEncodeOpcode(grammar, &context, &inst)) {
       return SPV_ERROR_INVALID_TEXT;
       return SPV_ERROR_INVALID_TEXT;
     }
     }