diff options
Diffstat (limited to 'source/val/validate_scopes.cpp')
-rw-r--r-- | source/val/validate_scopes.cpp | 25 |
1 files changed, 22 insertions, 3 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; + }); + } } } |