mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 03:30:06 +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,6 +2115,7 @@ spv_result_t ValidateCooperativeMatrixLoadStoreKHR(ValidationState_t& _,
|
||||
const auto storage_class =
|
||||
pointer_type->GetOperandAs<spv::StorageClass>(storage_class_index);
|
||||
|
||||
if (spvIsVulkanEnv(_.context()->target_env)) {
|
||||
if (storage_class != spv::StorageClass::Workgroup &&
|
||||
storage_class != spv::StorageClass::StorageBuffer &&
|
||||
storage_class != spv::StorageClass::PhysicalStorageBuffer) {
|
||||
@ -2124,6 +2125,7 @@ spv_result_t ValidateCooperativeMatrixLoadStoreKHR(ValidationState_t& _,
|
||||
<< _.getIdName(pointer_type_id)
|
||||
<< " is not Workgroup, StorageBuffer, or PhysicalStorageBuffer.";
|
||||
}
|
||||
}
|
||||
|
||||
if (!untyped) {
|
||||
const auto pointee_id = pointer_type->GetOperandAs<uint32_t>(2);
|
||||
|
Loading…
Reference in New Issue
Block a user