spirv-val: Add Vulkan Addressing Model check (#4107)
This commit is contained in:
Родитель
9150cd441f
Коммит
ee39b5db5f
|
@ -498,6 +498,15 @@ spv_result_t ValidateMemoryModel(ValidationState_t& _,
|
|||
}
|
||||
}
|
||||
|
||||
if (spvIsVulkanEnv(_.context()->target_env)) {
|
||||
if ((_.addressing_model() != SpvAddressingModelLogical) &&
|
||||
(_.addressing_model() != SpvAddressingModelPhysicalStorageBuffer64)) {
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, inst)
|
||||
<< _.VkErrorID(4635)
|
||||
<< "Addressing model must be Logical or PhysicalStorageBuffer64 "
|
||||
<< "in the Vulkan environment.";
|
||||
}
|
||||
}
|
||||
return SPV_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -1650,6 +1650,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
|
|||
return VUID_WRAP(VUID-ShadingRateKHR-ShadingRateKHR-04492);
|
||||
case 4633:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-None-04633);
|
||||
case 4635:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-None-04635);
|
||||
case 4642:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-None-04642);
|
||||
case 4649:
|
||||
|
|
Загрузка…
Ссылка в новой задаче