spirv-val: Add last TessLevelOuter and TessLevelInner VUID (#4055)

This commit is contained in:
sfricke-samsung 2020-12-08 11:38:55 -08:00 коммит произвёл GitHub
Родитель 171290703a
Коммит 3b85234542
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@ -2475,8 +2475,9 @@ spv_result_t BuiltInsValidator::ValidateTessLevelAtReference(
if (storage_class == SpvStorageClassInput) {
assert(function_id_ == 0);
uint32_t vuid = (decoration.params()[0] == SpvBuiltInTessLevelOuter) ? 4391 : 4395;
id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind(
&BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, -1,
&BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid,
"Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be "
"used "
"for variables with Input storage class if execution model is "
@ -2487,8 +2488,9 @@ spv_result_t BuiltInsValidator::ValidateTessLevelAtReference(
if (storage_class == SpvStorageClassOutput) {
assert(function_id_ == 0);
uint32_t vuid = (decoration.params()[0] == SpvBuiltInTessLevelOuter) ? 4392 : 4396;
id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind(
&BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, -1,
&BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid,
"Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be "
"used "
"for variables with Output storage class if execution model is "

Просмотреть файл

@ -1547,10 +1547,18 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
return VUID_WRAP(VUID-TessCoord-TessCoord-04389);
case 4390:
return VUID_WRAP(VUID-TessLevelOuter-TessLevelOuter-04390);
case 4391:
return VUID_WRAP(VUID-TessLevelOuter-TessLevelOuter-04391);
case 4392:
return VUID_WRAP(VUID-TessLevelOuter-TessLevelOuter-04392);
case 4393:
return VUID_WRAP(VUID-TessLevelOuter-TessLevelOuter-04393);
case 4394:
return VUID_WRAP(VUID-TessLevelInner-TessLevelInner-04394);
case 4395:
return VUID_WRAP(VUID-TessLevelInner-TessLevelInner-04395);
case 4396:
return VUID_WRAP(VUID-TessLevelInner-TessLevelInner-04396);
case 4397:
return VUID_WRAP(VUID-TessLevelInner-TessLevelInner-04397);
case 4398:

Просмотреть файл

@ -1949,7 +1949,8 @@ INSTANTIATE_TEST_SUITE_P(
TessLevelOuterOutputTese,
ValidateVulkanCombineBuiltInExecutionModelDataTypeResult,
Combine(Values("TessLevelOuter"), Values("TessellationEvaluation"),
Values("Output"), Values("%f32arr4"), Values(nullptr),
Values("Output"), Values("%f32arr4"),
Values("VUID-TessLevelOuter-TessLevelOuter-04392"),
Values(TestResult(
SPV_ERROR_INVALID_DATA,
"Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be "
@ -1960,7 +1961,8 @@ INSTANTIATE_TEST_SUITE_P(
TessLevelOuterInputTesc,
ValidateVulkanCombineBuiltInExecutionModelDataTypeResult,
Combine(Values("TessLevelOuter"), Values("TessellationControl"),
Values("Input"), Values("%f32arr4"), Values(nullptr),
Values("Input"), Values("%f32arr4"),
Values("VUID-TessLevelOuter-TessLevelOuter-04391"),
Values(TestResult(
SPV_ERROR_INVALID_DATA,
"Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be "
@ -2036,7 +2038,8 @@ INSTANTIATE_TEST_SUITE_P(
TessLevelInnerOutputTese,
ValidateVulkanCombineBuiltInExecutionModelDataTypeResult,
Combine(Values("TessLevelInner"), Values("TessellationEvaluation"),
Values("Output"), Values("%f32arr2"), Values(nullptr),
Values("Output"), Values("%f32arr2"),
Values("VUID-TessLevelInner-TessLevelInner-04396"),
Values(TestResult(
SPV_ERROR_INVALID_DATA,
"Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be "
@ -2047,7 +2050,8 @@ INSTANTIATE_TEST_SUITE_P(
TessLevelInnerInputTesc,
ValidateVulkanCombineBuiltInExecutionModelDataTypeResult,
Combine(Values("TessLevelInner"), Values("TessellationControl"),
Values("Input"), Values("%f32arr2"), Values(nullptr),
Values("Input"), Values("%f32arr2"),
Values("VUID-TessLevelInner-TessLevelInner-04395"),
Values(TestResult(
SPV_ERROR_INVALID_DATA,
"Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be "