spirv-val: Add VUID label for 07703 (#4980)
This commit is contained in:
Родитель
d35a78db57
Коммит
a5e766b2b4
|
@ -1718,6 +1718,7 @@ spv_result_t CheckComponentDecoration(ValidationState_t& vstate,
|
|||
} else if (bit_width == 64) {
|
||||
if (dimension > 2) {
|
||||
return vstate.diag(SPV_ERROR_INVALID_ID, &inst)
|
||||
<< vstate.VkErrorID(7703)
|
||||
<< "Component decoration only allowed on 64-bit scalar and "
|
||||
"2-component vector";
|
||||
}
|
||||
|
|
|
@ -2160,6 +2160,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
|
|||
return VUID_WRAP(VUID-StandaloneSpirv-Base-07651);
|
||||
case 7652:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-Base-07652);
|
||||
case 7703:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-Component-07703);
|
||||
default:
|
||||
return ""; // unknown id
|
||||
}
|
||||
|
|
|
@ -7194,6 +7194,8 @@ TEST_F(ValidateDecorations, ComponentDecoration64VecWideBadVulkan) {
|
|||
|
||||
CompileSuccessfully(spirv, env);
|
||||
EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateAndRetrieveValidationState(env));
|
||||
EXPECT_THAT(getDiagnosticString(),
|
||||
AnyVUID("VUID-StandaloneSpirv-Component-07703"));
|
||||
EXPECT_THAT(getDiagnosticString(),
|
||||
HasSubstr("Component decoration only allowed on 64-bit scalar "
|
||||
"and 2-component vector"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче