浏览代码

Update SPIRV-Tools known good version

Also update tests for texture*Offset functions with non-const offsets to
use the new validator option, without expecting a failure.
Ricardo Garcia 7 月之前
父节点
当前提交
22a33d6742

+ 1 - 0
SPIRV/SpvTools.cpp

@@ -165,6 +165,7 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<
     spvValidatorOptionsSetBeforeHlslLegalization(options, prelegalization);
     spvValidatorOptionsSetScalarBlockLayout(options, intermediate.usingScalarBlockLayout());
     spvValidatorOptionsSetWorkgroupScalarBlockLayout(options, intermediate.usingScalarBlockLayout());
+    spvValidatorOptionsSetAllowOffsetTextureOperand(options, intermediate.usingTextureOffsetNonConst());
     spvValidateWithOptions(context, options, &binary, &diagnostic);
 
     // report

+ 0 - 1
Test/baseResults/spv.sparsetextureoffset_non_const.vert.out

@@ -1,5 +1,4 @@
 spv.sparsetextureoffset_non_const.vert
-Validation failed
 // Module Version 10000
 // Generated by (magic number): 8000b
 // Id's are bound by 114

+ 0 - 1
Test/baseResults/spv.textureoffset_non_const.vert.out

@@ -1,5 +1,4 @@
 spv.textureoffset_non_const.vert
-Validation failed
 // Module Version 10000
 // Generated by (magic number): 8000b
 // Id's are bound by 140

+ 5 - 5
glslang/MachineIndependent/localintermediate.h

@@ -1035,11 +1035,11 @@ public:
 #endif
 
     bool usingScalarBlockLayout() const {
-        for (auto extIt = requestedExtensions.begin(); extIt != requestedExtensions.end(); ++extIt) {
-            if (*extIt == E_GL_EXT_scalar_block_layout)
-                return true;
-        }
-        return false;
+        return IsRequestedExtension(E_GL_EXT_scalar_block_layout);
+    }
+
+    bool usingTextureOffsetNonConst() const {
+        return IsRequestedExtension(E_GL_EXT_texture_offset_non_const);
     }
 
     bool IsRequestedExtension(const char* extension) const

+ 1 - 1
known_good.json

@@ -5,7 +5,7 @@
       "site" : "github",
       "subrepo" : "KhronosGroup/SPIRV-Tools",
       "subdir" : "External/spirv-tools",
-      "commit": "4d2f0b40bfe290dea6c6904dafdf7fd8328ba346"
+      "commit": "066c3d52c2fca8d9df79ca37055c3f5eddf2ffce"
     },
     {
       "name" : "spirv-tools/external/spirv-headers",