Skip to content

Commit

Permalink
Update SPIRV-Tools known good version
Browse files Browse the repository at this point in the history
Also update tests for texture*Offset functions with non-const offsets to
use the new validator option, without expecting a failure.
  • Loading branch information
rg3igalia committed Jan 22, 2025
1 parent a2f51d2 commit 717ca59
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions SPIRV/SpvTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion Test/baseResults/spv.textureoffset_non_const.vert.out
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions glslang/MachineIndependent/localintermediate.h
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,11 @@ class TIntermediate {
#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
Expand Down
2 changes: 1 addition & 1 deletion known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools",
"commit": "4d2f0b40bfe290dea6c6904dafdf7fd8328ba346"
"commit": "066c3d52c2fca8d9df79ca37055c3f5eddf2ffce"
},
{
"name" : "spirv-tools/external/spirv-headers",
Expand Down

0 comments on commit 717ca59

Please sign in to comment.