diff options
author | Spencer Fricke <spencerfricke@gmail.com> | 2022-09-16 21:51:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 21:51:36 +0300 |
commit | 0c4ce11b4a90723fddd03b547a39f26ad05561de (patch) | |
tree | b5928defd20acfb24537336058f9d722ce3edcb2 | |
parent | 5f4ce362ad45b0813de5706377ebde188f7d9a6b (diff) |
spirv-val: Update VUID from 1.3.228 Vulkan spec (#4936)
Co-authored-by: alan-baker <alanbaker@google.com>
-rw-r--r-- | source/val/validate_scopes.cpp | 25 | ||||
-rw-r--r-- | source/val/validation_state.cpp | 6 | ||||
-rw-r--r-- | test/val/val_barriers_test.cpp | 11 |
3 files changed, 32 insertions, 10 deletions
diff --git a/source/val/validate_scopes.cpp b/source/val/validate_scopes.cpp index 5fb661b0d..e9781802c 100644 --- a/source/val/validate_scopes.cpp +++ b/source/val/validate_scopes.cpp @@ -265,11 +265,12 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, } if (value == SpvScopeWorkgroup) { - std::string errorVUID = _.VkErrorID(4639); + std::string errorVUID = _.VkErrorID(7321); _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( [errorVUID](SpvExecutionModel model, std::string* message) { if (model != SpvExecutionModelGLCompute && + model != SpvExecutionModelTessellationControl && model != SpvExecutionModelTaskNV && model != SpvExecutionModelMeshNV && model != SpvExecutionModelTaskEXT && @@ -277,13 +278,31 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, if (message) { *message = errorVUID + "Workgroup Memory Scope is limited to MeshNV, " - "TaskNV, MeshEXT, TaskEXT and GLCompute " - "execution model"; + "TaskNV, MeshEXT, TaskEXT, TessellationControl, " + "and GLCompute execution model"; } return false; } return true; }); + + if (_.memory_model() == SpvMemoryModelGLSL450) { + errorVUID = _.VkErrorID(7320); + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](SpvExecutionModel model, std::string* message) { + if (model == SpvExecutionModelTessellationControl) { + if (message) { + *message = + errorVUID + + "Workgroup Memory Scope can't be used with " + "TessellationControl using GLSL450 Memory Model"; + } + return false; + } + return true; + }); + } } } diff --git a/source/val/validation_state.cpp b/source/val/validation_state.cpp index d826acd4f..fa8c624ed 100644 --- a/source/val/validation_state.cpp +++ b/source/val/validation_state.cpp @@ -1970,8 +1970,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-None-04637); case 4638: return VUID_WRAP(VUID-StandaloneSpirv-None-04638); - case 4639: - return VUID_WRAP(VUID-StandaloneSpirv-None-04639); + case 7321: + return VUID_WRAP(VUID-StandaloneSpirv-None-07321); case 4640: return VUID_WRAP(VUID-StandaloneSpirv-None-04640); case 4641: @@ -2110,6 +2110,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-Uniform-06925); case 6997: return VUID_WRAP(VUID-StandaloneSpirv-SubgroupVoteKHR-06997); + case 7320: + return VUID_WRAP(VUID-StandaloneSpirv-ExecutionModel-07320); case 7290: return VUID_WRAP(VUID-StandaloneSpirv-Input-07290); default: diff --git a/test/val/val_barriers_test.cpp b/test/val/val_barriers_test.cpp index 2569de0d0..073a0f697 100644 --- a/test/val/val_barriers_test.cpp +++ b/test/val/val_barriers_test.cpp @@ -416,11 +416,12 @@ OpControlBarrier %subgroup %workgroup %acquire CompileSuccessfully(GenerateVulkanVertexShaderCode(body), SPV_ENV_VULKAN_1_1); EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateInstructions(SPV_ENV_VULKAN_1_1)); EXPECT_THAT(getDiagnosticString(), - AnyVUID("VUID-StandaloneSpirv-None-04639")); - EXPECT_THAT(getDiagnosticString(), - HasSubstr("Workgroup Memory Scope is limited to MeshNV, " - "TaskNV, MeshEXT, TaskEXT and GLCompute " - "execution model")); + AnyVUID("VUID-StandaloneSpirv-None-07321")); + EXPECT_THAT( + getDiagnosticString(), + HasSubstr("Workgroup Memory Scope is limited to MeshNV, " + "TaskNV, MeshEXT, TaskEXT, TessellationControl, and GLCompute " + "execution model")); } TEST_F(ValidateBarriers, |