Skip to content

Commit

Permalink
spirv-val: Update VUIDs for 308 header (KhronosGroup#5990)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg authored Feb 9, 2025
1 parent 9d7e182 commit b3fe11f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/val/validate_decorations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ spv_result_t CheckComponentDecoration(ValidationState_t& vstate,
if (!vstate.IsIntScalarOrVectorType(type_id) &&
!vstate.IsFloatScalarOrVectorType(type_id)) {
return vstate.diag(SPV_ERROR_INVALID_ID, &inst)
<< vstate.VkErrorID(4924)
<< vstate.VkErrorID(10583)
<< "Component decoration specified for type "
<< vstate.getIdName(type_id) << " that is not a scalar or vector";
}
Expand Down
4 changes: 2 additions & 2 deletions source/val/validation_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2415,8 +2415,6 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
return VUID_WRAP(VUID-StandaloneSpirv-Component-04922);
case 4923:
return VUID_WRAP(VUID-StandaloneSpirv-Component-04923);
case 4924:
return VUID_WRAP(VUID-StandaloneSpirv-Component-04924);
case 6201:
return VUID_WRAP(VUID-StandaloneSpirv-Flat-06201);
case 6202:
Expand Down Expand Up @@ -2534,6 +2532,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
case 10213:
// This use to be a standalone, but maintenance8 will set allow_offset_texture_operand now
return VUID_WRAP(VUID-RuntimeSpirv-Offset-10213);
case 10583:
return VUID_WRAP(VUID-StandaloneSpirv-Component-10583);
default:
return ""; // unknown id
}
Expand Down
2 changes: 1 addition & 1 deletion test/val/val_decoration_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7076,7 +7076,7 @@ OpFunctionEnd
CompileSuccessfully(spirv, env);
EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateAndRetrieveValidationState(env));
EXPECT_THAT(getDiagnosticString(),
AnyVUID("VUID-StandaloneSpirv-Component-04924"));
AnyVUID("VUID-StandaloneSpirv-Component-10583"));
EXPECT_THAT(getDiagnosticString(),
HasSubstr("Component decoration specified for type"));
EXPECT_THAT(getDiagnosticString(), HasSubstr("is not a scalar or vector"));
Expand Down

0 comments on commit b3fe11f

Please sign in to comment.