mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-10-18 19:20:05 +00:00
spirv-val: Add last ViewportIndex and Layer VUID (#4053)
This commit is contained in:
parent
9df5225e67
commit
1a6b4053fa
@ -2775,8 +2775,9 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtReference(
|
||||
if (operand == SpvBuiltInLayer)
|
||||
capability = "ShaderViewportIndexLayerEXT or ShaderLayer";
|
||||
|
||||
uint32_t vuid = (operand == SpvBuiltInLayer) ? 4273 : 4405;
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst)
|
||||
<< "Using BuiltIn "
|
||||
<< _.VkErrorID(vuid) << "Using BuiltIn "
|
||||
<< _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN,
|
||||
operand)
|
||||
<< " in Vertex or Tessellation execution model requires the "
|
||||
|
@ -1419,6 +1419,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
|
||||
return VUID_WRAP(VUID-LaunchSizeKHR-LaunchSizeKHR-04271);
|
||||
case 4272:
|
||||
return VUID_WRAP(VUID-Layer-Layer-04272);
|
||||
case 4273:
|
||||
return VUID_WRAP(VUID-Layer-Layer-04273);
|
||||
case 4274:
|
||||
return VUID_WRAP(VUID-Layer-Layer-04274);
|
||||
case 4275:
|
||||
@ -1553,6 +1555,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
|
||||
return VUID_WRAP(VUID-ViewIndex-ViewIndex-04403);
|
||||
case 4404:
|
||||
return VUID_WRAP(VUID-ViewportIndex-ViewportIndex-04404);
|
||||
case 4405:
|
||||
return VUID_WRAP(VUID-ViewportIndex-ViewportIndex-04405);
|
||||
case 4406:
|
||||
return VUID_WRAP(VUID-ViewportIndex-ViewportIndex-04406);
|
||||
case 4407:
|
||||
|
@ -1256,7 +1256,8 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
ViewportIndexExecutionModelEnabledByCapability,
|
||||
ValidateVulkanCombineBuiltInExecutionModelDataTypeResult,
|
||||
Combine(Values("ViewportIndex"), Values("Vertex", "TessellationEvaluation"),
|
||||
Values("Output"), Values("%u32"), Values(nullptr),
|
||||
Values("Output"), Values("%u32"),
|
||||
Values("VUID-ViewportIndex-ViewportIndex-04405"),
|
||||
Values(TestResult(
|
||||
SPV_ERROR_INVALID_DATA,
|
||||
"ShaderViewportIndexLayerEXT or ShaderViewportIndex"))));
|
||||
@ -1265,7 +1266,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
LayerExecutionModelEnabledByCapability,
|
||||
ValidateVulkanCombineBuiltInExecutionModelDataTypeResult,
|
||||
Combine(Values("Layer"), Values("Vertex", "TessellationEvaluation"),
|
||||
Values("Output"), Values("%u32"), Values(nullptr),
|
||||
Values("Output"), Values("%u32"), Values("VUID-Layer-Layer-04273"),
|
||||
Values(TestResult(SPV_ERROR_INVALID_DATA,
|
||||
"ShaderViewportIndexLayerEXT or ShaderLayer"))));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user