spirv-val: Update VUID from 1.3.228 Vulkan spec (#4936)
Co-authored-by: alan-baker <alanbaker@google.com>
This commit is contained in:
Родитель
5f4ce362ad
Коммит
0c4ce11b4a
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче