diff options
author | Spencer Fricke <115671160+spencer-lunarg@users.noreply.github.com> | 2022-11-07 03:05:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 03:05:25 +0300 |
commit | a5e766b2b47cf59f27b69761e9cc4298eec38528 (patch) | |
tree | 7595e119b798902b230195f7e722a58d2a4e5230 | |
parent | d35a78db57e6c0bca4b284369d12e96292e2dfd5 (diff) |
spirv-val: Add VUID label for 07703 (#4980)
-rw-r--r-- | source/val/validate_decorations.cpp | 1 | ||||
-rw-r--r-- | source/val/validation_state.cpp | 2 | ||||
-rw-r--r-- | test/val/val_decoration_test.cpp | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/source/val/validate_decorations.cpp b/source/val/validate_decorations.cpp index 55a2681d6..ef9753da4 100644 --- a/source/val/validate_decorations.cpp +++ b/source/val/validate_decorations.cpp @@ -1718,6 +1718,7 @@ spv_result_t CheckComponentDecoration(ValidationState_t& vstate, } else if (bit_width == 64) { if (dimension > 2) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(7703) << "Component decoration only allowed on 64-bit scalar and " "2-component vector"; } diff --git a/source/val/validation_state.cpp b/source/val/validation_state.cpp index bb33fb526..07dc04201 100644 --- a/source/val/validation_state.cpp +++ b/source/val/validation_state.cpp @@ -2160,6 +2160,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-Base-07651); case 7652: return VUID_WRAP(VUID-StandaloneSpirv-Base-07652); + case 7703: + return VUID_WRAP(VUID-StandaloneSpirv-Component-07703); default: return ""; // unknown id } diff --git a/test/val/val_decoration_test.cpp b/test/val/val_decoration_test.cpp index 64ab8d05e..ff62f4b0c 100644 --- a/test/val/val_decoration_test.cpp +++ b/test/val/val_decoration_test.cpp @@ -7195,6 +7195,8 @@ TEST_F(ValidateDecorations, ComponentDecoration64VecWideBadVulkan) { CompileSuccessfully(spirv, env); EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateAndRetrieveValidationState(env)); EXPECT_THAT(getDiagnosticString(), + AnyVUID("VUID-StandaloneSpirv-Component-07703")); + EXPECT_THAT(getDiagnosticString(), HasSubstr("Component decoration only allowed on 64-bit scalar " "and 2-component vector")); } |