mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-21 19:20:07 +00:00
spirv-val: Report VUID 08973 only in Vulkan environments (#5873)
The storage class restriction for `OpCooperativeMatrixLoadKHR` and `OpCooperativeMatrixStoreKHR` comes from the Vulkan specification; as such VUID 08973 should not be reported outside of Vulkan target environments. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
parent
9117e042b9
commit
384d527ebb
@ -2115,14 +2115,16 @@ spv_result_t ValidateCooperativeMatrixLoadStoreKHR(ValidationState_t& _,
|
||||
const auto storage_class =
|
||||
pointer_type->GetOperandAs<spv::StorageClass>(storage_class_index);
|
||||
|
||||
if (storage_class != spv::StorageClass::Workgroup &&
|
||||
storage_class != spv::StorageClass::StorageBuffer &&
|
||||
storage_class != spv::StorageClass::PhysicalStorageBuffer) {
|
||||
return _.diag(SPV_ERROR_INVALID_ID, inst)
|
||||
<< _.VkErrorID(8973) << opname
|
||||
<< " storage class for pointer type <id> "
|
||||
<< _.getIdName(pointer_type_id)
|
||||
<< " is not Workgroup, StorageBuffer, or PhysicalStorageBuffer.";
|
||||
if (spvIsVulkanEnv(_.context()->target_env)) {
|
||||
if (storage_class != spv::StorageClass::Workgroup &&
|
||||
storage_class != spv::StorageClass::StorageBuffer &&
|
||||
storage_class != spv::StorageClass::PhysicalStorageBuffer) {
|
||||
return _.diag(SPV_ERROR_INVALID_ID, inst)
|
||||
<< _.VkErrorID(8973) << opname
|
||||
<< " storage class for pointer type <id> "
|
||||
<< _.getIdName(pointer_type_id)
|
||||
<< " is not Workgroup, StorageBuffer, or PhysicalStorageBuffer.";
|
||||
}
|
||||
}
|
||||
|
||||
if (!untyped) {
|
||||
|
Loading…
Reference in New Issue
Block a user