mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-26 05:10:05 +00:00
Update SPIRV-Headers (#4573)
* Add pass-through validation for Offsets image operand * it is counted as an offset parameter though * Update DEPS
This commit is contained in:
parent
6dd73728e9
commit
0292d6b16a
2
DEPS
2
DEPS
@ -6,7 +6,7 @@ vars = {
|
||||
'effcee_revision': '2ec8f8738118cc483b67c04a759fee53496c5659',
|
||||
'googletest_revision': '955c7f837efad184ec63e771c42542d37545eaef',
|
||||
're2_revision': '4244cd1cb492fa1d10986ec67f862964c073f844',
|
||||
'spirv_headers_revision': 'ae217c17809fadb232ec94b29304b4afcd417bb4',
|
||||
'spirv_headers_revision': '19e8350415ed9516c8afffa19ae2c58559495a67',
|
||||
}
|
||||
|
||||
deps = {
|
||||
|
@ -286,13 +286,14 @@ spv_result_t ValidateImageOperands(ValidationState_t& _,
|
||||
// the module to be invalid.
|
||||
if (mask == 0) return SPV_SUCCESS;
|
||||
|
||||
if (spvtools::utils::CountSetBits(
|
||||
mask & (SpvImageOperandsOffsetMask | SpvImageOperandsConstOffsetMask |
|
||||
SpvImageOperandsConstOffsetsMask)) > 1) {
|
||||
if (spvtools::utils::CountSetBits(mask & (SpvImageOperandsOffsetMask |
|
||||
SpvImageOperandsConstOffsetMask |
|
||||
SpvImageOperandsConstOffsetsMask |
|
||||
SpvImageOperandsOffsetsMask)) > 1) {
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, inst)
|
||||
<< _.VkErrorID(4662)
|
||||
<< "Image Operands Offset, ConstOffset, ConstOffsets cannot be used "
|
||||
<< "together";
|
||||
<< "Image Operands Offset, ConstOffset, ConstOffsets, Offsets "
|
||||
"cannot be used together";
|
||||
}
|
||||
|
||||
const bool is_implicit_lod = IsImplicitLod(opcode);
|
||||
@ -625,6 +626,10 @@ spv_result_t ValidateImageOperands(ValidationState_t& _,
|
||||
// setup.
|
||||
}
|
||||
|
||||
if (mask & SpvImageOperandsOffsetsMask) {
|
||||
// TODO: add validation
|
||||
}
|
||||
|
||||
return SPV_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1815,9 +1815,10 @@ TEST_F(ValidateImage, SampleImplicitLodMoreThanOneOffset) {
|
||||
|
||||
CompileSuccessfully(GenerateShaderCode(body).c_str());
|
||||
ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions());
|
||||
EXPECT_THAT(getDiagnosticString(),
|
||||
HasSubstr("Image Operands Offset, ConstOffset, ConstOffsets "
|
||||
"cannot be used together"));
|
||||
EXPECT_THAT(
|
||||
getDiagnosticString(),
|
||||
HasSubstr("Image Operands Offset, ConstOffset, ConstOffsets, Offsets "
|
||||
"cannot be used together"));
|
||||
}
|
||||
|
||||
TEST_F(ValidateImage, SampleImplicitLodVulkanMoreThanOneOffset) {
|
||||
@ -1833,9 +1834,10 @@ TEST_F(ValidateImage, SampleImplicitLodVulkanMoreThanOneOffset) {
|
||||
ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions(SPV_ENV_VULKAN_1_0));
|
||||
EXPECT_THAT(getDiagnosticString(),
|
||||
AnyVUID("VUID-StandaloneSpirv-Offset-04662"));
|
||||
EXPECT_THAT(getDiagnosticString(),
|
||||
HasSubstr("Image Operands Offset, ConstOffset, ConstOffsets "
|
||||
"cannot be used together"));
|
||||
EXPECT_THAT(
|
||||
getDiagnosticString(),
|
||||
HasSubstr("Image Operands Offset, ConstOffset, ConstOffsets, Offsets "
|
||||
"cannot be used together"));
|
||||
}
|
||||
|
||||
TEST_F(ValidateImage, SampleImplicitLodMinLodWrongType) {
|
||||
|
Loading…
Reference in New Issue
Block a user