From 3947099d7e9639ace55336f116924b4501ed1c2b Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Mon, 23 Jun 2025 14:38:12 -0400 Subject: [PATCH] Revert "[SPIRV] Use unknown image format in vk1.3 and later (#7528)" This reverts commit 57177f77a4dc6996400ac97a0d618799c82374e8. --- .../clang/include/clang/SPIRV/SpirvBuilder.h | 2 - tools/clang/lib/SPIRV/LowerTypeVisitor.cpp | 7 - .../CodeGenSPIRV/node.empty-node-input.hlsl | 2 +- .../clang/test/CodeGenSPIRV/type.buffer.hlsl | 176 +++++++----------- .../type.rasterizer-ordered-buffer.hlsl | 92 ++++----- .../type.rasterizer-ordered-texture.hlsl | 36 ++-- .../test/CodeGenSPIRV/type.rwtexture.hlsl | 56 ++---- 7 files changed, 137 insertions(+), 234 deletions(-) diff --git a/tools/clang/include/clang/SPIRV/SpirvBuilder.h b/tools/clang/include/clang/SPIRV/SpirvBuilder.h index 4fe31c6d62..465f7313f1 100644 --- a/tools/clang/include/clang/SPIRV/SpirvBuilder.h +++ b/tools/clang/include/clang/SPIRV/SpirvBuilder.h @@ -812,8 +812,6 @@ class SpirvBuilder { /// the given target at the given source location. inline void requireExtension(llvm::StringRef extension, SourceLocation); - FeatureManager &getFeatureManager() { return featureManager; } - private: /// \brief If not added already, adds an OpExtInstImport (import of extended /// instruction set) for the given instruction set. Returns the imported diff --git a/tools/clang/lib/SPIRV/LowerTypeVisitor.cpp b/tools/clang/lib/SPIRV/LowerTypeVisitor.cpp index 0309d56840..1869983ae3 100644 --- a/tools/clang/lib/SPIRV/LowerTypeVisitor.cpp +++ b/tools/clang/lib/SPIRV/LowerTypeVisitor.cpp @@ -1156,13 +1156,6 @@ LowerTypeVisitor::lowerStructFields(const RecordDecl *decl, spv::ImageFormat LowerTypeVisitor::translateSampledTypeToImageFormat(QualType sampledType, SourceLocation srcLoc) { - - // In Vulkan 1.3, all image types can be Unknown. - FeatureManager &featureManager = spvBuilder.getFeatureManager(); - if (!featureManager.isTargetEnvVulkan() || - featureManager.isTargetEnvVulkan1p3OrAbove()) - return spv::ImageFormat::Unknown; - uint32_t elemCount = 1; QualType ty = {}; if (!isScalarType(sampledType, &ty) && diff --git a/tools/clang/test/CodeGenSPIRV/node.empty-node-input.hlsl b/tools/clang/test/CodeGenSPIRV/node.empty-node-input.hlsl index da6a1d32df..fa16429a1b 100644 --- a/tools/clang/test/CodeGenSPIRV/node.empty-node-input.hlsl +++ b/tools/clang/test/CodeGenSPIRV/node.empty-node-input.hlsl @@ -19,7 +19,7 @@ void emptynodeinput(EmptyNodeInput input) // CHECK-DAG: [[UINT:%[^ ]*]] = OpTypeInt 32 0 // CHECK-DAG: [[U0:%[^ ]*]] = OpConstant [[UINT]] 0 -// CHECK-DAG: [[IMG:%[^ ]*]] = OpTypeImage [[UINT]] Buffer 2 0 0 2 Unknown +// CHECK-DAG: [[IMG:%[^ ]*]] = OpTypeImage [[UINT]] Buffer 2 0 0 2 R32ui // CHECK-DAG: [[IMGPTR:%[^ ]*]] = OpTypePointer UniformConstant [[IMG]] // CHECK-DAG: [[BUF:%[^ ]*]] = OpVariable [[IMGPTR]] UniformConstant diff --git a/tools/clang/test/CodeGenSPIRV/type.buffer.hlsl b/tools/clang/test/CodeGenSPIRV/type.buffer.hlsl index 3e7bb73bcb..35d1b868a8 100644 --- a/tools/clang/test/CodeGenSPIRV/type.buffer.hlsl +++ b/tools/clang/test/CodeGenSPIRV/type.buffer.hlsl @@ -1,149 +1,109 @@ -// RUN: %dxc -T ps_6_0 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,INFER -// RUN: %dxc -fspv-target-env=vulkan1.3 -T ps_6_0 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN -// RUN: %dxc -fspv-target-env=universal1.5 -T ps_6_0 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN - -// Before vulkan1.3, we should be trying to infer the image type for because -// we cannot necessarily use Unknown. However in VK1.3 and later, we can use -// Unknown. +// RUN: %dxc -T ps_6_0 -E main -fcgl %s -spirv | FileCheck %s // CHECK: OpCapability SampledBuffer -// INFER: OpCapability StorageImageExtendedFormats +// CHECK: OpCapability StorageImageExtendedFormats -// INFER: %type_buffer_image = OpTypeImage %int Buffer 2 0 0 1 R32i -// UNKNOWN: %type_buffer_image = OpTypeImage %int Buffer 2 0 0 1 Unknown +// CHECK: %type_buffer_image = OpTypeImage %int Buffer 2 0 0 1 R32i // CHECK: %_ptr_UniformConstant_type_buffer_image = OpTypePointer UniformConstant %type_buffer_image Buffer intbuf; -// INFER: %type_buffer_image_0 = OpTypeImage %uint Buffer 2 0 0 1 R32ui -// UNKNOWN: %type_buffer_image_0 = OpTypeImage %uint Buffer 2 0 0 1 Unknown +// CHECK: %type_buffer_image_0 = OpTypeImage %uint Buffer 2 0 0 1 R32ui // CHECK: %_ptr_UniformConstant_type_buffer_image_0 = OpTypePointer UniformConstant %type_buffer_image_0 Buffer uintbuf; -// INFER: %type_buffer_image_1 = OpTypeImage %float Buffer 2 0 0 1 R32f -// UNKNOWN: %type_buffer_image_1 = OpTypeImage %float Buffer 2 0 0 1 Unknown +// CHECK: %type_buffer_image_1 = OpTypeImage %float Buffer 2 0 0 1 R32f // CHECK: %_ptr_UniformConstant_type_buffer_image_1 = OpTypePointer UniformConstant %type_buffer_image_1 Buffer floatbuf; -// INFER: %type_buffer_image_2 = OpTypeImage %int Buffer 2 0 0 2 R32i -// UNKNOWN: %type_buffer_image_2 = OpTypeImage %int Buffer 2 0 0 2 Unknown +// CHECK: %type_buffer_image_2 = OpTypeImage %int Buffer 2 0 0 2 R32i // CHECK: %_ptr_UniformConstant_type_buffer_image_2 = OpTypePointer UniformConstant %type_buffer_image_2 RWBuffer intrwbuf; -// INFER: %type_buffer_image_3 = OpTypeImage %uint Buffer 2 0 0 2 R32ui -// UNKNOWN: %type_buffer_image_3 = OpTypeImage %uint Buffer 2 0 0 2 Unknown +// CHECK: %type_buffer_image_3 = OpTypeImage %uint Buffer 2 0 0 2 R32ui // CHECK: %_ptr_UniformConstant_type_buffer_image_3 = OpTypePointer UniformConstant %type_buffer_image_3 RWBuffer uintrwbuf; -// INFER: %type_buffer_image_4 = OpTypeImage %float Buffer 2 0 0 2 R32f -// UNKNOWN: %type_buffer_image_4 = OpTypeImage %float Buffer 2 0 0 2 Unknown +// CHECK: %type_buffer_image_4 = OpTypeImage %float Buffer 2 0 0 2 R32f // CHECK: %_ptr_UniformConstant_type_buffer_image_4 = OpTypePointer UniformConstant %type_buffer_image_4 RWBuffer floatrwbuf; -// If the `Unkonwn image format is used, then the images below will reuse the types above. -// UNKNOWN-NOT: OpTypeImage - -// INFER: %type_buffer_image_5 = OpTypeImage %int Buffer 2 0 0 1 Rg32i -// INFER: %_ptr_UniformConstant_type_buffer_image_5 = OpTypePointer UniformConstant %type_buffer_image_5 +// CHECK: %type_buffer_image_5 = OpTypeImage %int Buffer 2 0 0 1 Rg32i +// CHECK: %_ptr_UniformConstant_type_buffer_image_5 = OpTypePointer UniformConstant %type_buffer_image_5 Buffer int2buf; -// INFER: %type_buffer_image_6 = OpTypeImage %uint Buffer 2 0 0 1 Rg32ui -// INFER: %_ptr_UniformConstant_type_buffer_image_6 = OpTypePointer UniformConstant %type_buffer_image_6 +// CHECK: %type_buffer_image_6 = OpTypeImage %uint Buffer 2 0 0 1 Rg32ui +// CHECK: %_ptr_UniformConstant_type_buffer_image_6 = OpTypePointer UniformConstant %type_buffer_image_6 Buffer uint2buf; -// INFER: %type_buffer_image_7 = OpTypeImage %float Buffer 2 0 0 1 Rg32f -// INFER: %_ptr_UniformConstant_type_buffer_image_7 = OpTypePointer UniformConstant %type_buffer_image_7 +// CHECK: %type_buffer_image_7 = OpTypeImage %float Buffer 2 0 0 1 Rg32f +// CHECK: %_ptr_UniformConstant_type_buffer_image_7 = OpTypePointer UniformConstant %type_buffer_image_7 Buffer float2buf; -// INFER: %type_buffer_image_8 = OpTypeImage %int Buffer 2 0 0 2 Rg32i -// INFER: %_ptr_UniformConstant_type_buffer_image_8 = OpTypePointer UniformConstant %type_buffer_image_8 +// CHECK: %type_buffer_image_8 = OpTypeImage %int Buffer 2 0 0 2 Rg32i +// CHECK: %_ptr_UniformConstant_type_buffer_image_8 = OpTypePointer UniformConstant %type_buffer_image_8 RWBuffer int2rwbuf; -// INFER: %type_buffer_image_9 = OpTypeImage %uint Buffer 2 0 0 2 Rg32ui -// INFER: %_ptr_UniformConstant_type_buffer_image_9 = OpTypePointer UniformConstant %type_buffer_image_9 +// CHECK: %type_buffer_image_9 = OpTypeImage %uint Buffer 2 0 0 2 Rg32ui +// CHECK: %_ptr_UniformConstant_type_buffer_image_9 = OpTypePointer UniformConstant %type_buffer_image_9 RWBuffer uint2rwbuf; -// INFER: %type_buffer_image_10 = OpTypeImage %float Buffer 2 0 0 2 Rg32f -// INFER: %_ptr_UniformConstant_type_buffer_image_10 = OpTypePointer UniformConstant %type_buffer_image_10 +// CHECK: %type_buffer_image_10 = OpTypeImage %float Buffer 2 0 0 2 Rg32f +// CHECK: %_ptr_UniformConstant_type_buffer_image_10 = OpTypePointer UniformConstant %type_buffer_image_10 RWBuffer float2rwbuf; -// INFER: %type_buffer_image_11 = OpTypeImage %int Buffer 2 0 0 1 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_11 = OpTypePointer UniformConstant %type_buffer_image_11 -// INFER: %type_buffer_image_12 = OpTypeImage %int Buffer 2 0 0 1 Rgba32i -// INFER: %_ptr_UniformConstant_type_buffer_image_12 = OpTypePointer UniformConstant %type_buffer_image_12 +// CHECK: %type_buffer_image_11 = OpTypeImage %int Buffer 2 0 0 1 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_11 = OpTypePointer UniformConstant %type_buffer_image_11 +// CHECK: %type_buffer_image_12 = OpTypeImage %int Buffer 2 0 0 1 Rgba32i +// CHECK: %_ptr_UniformConstant_type_buffer_image_12 = OpTypePointer UniformConstant %type_buffer_image_12 Buffer int3buf; Buffer int4buf; -// INFER: %type_buffer_image_13 = OpTypeImage %uint Buffer 2 0 0 1 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_13 = OpTypePointer UniformConstant %type_buffer_image_13 -// INFER: %type_buffer_image_14 = OpTypeImage %uint Buffer 2 0 0 1 Rgba32ui -// INFER: %_ptr_UniformConstant_type_buffer_image_14 = OpTypePointer UniformConstant %type_buffer_image_14 +// CHECK: %type_buffer_image_13 = OpTypeImage %uint Buffer 2 0 0 1 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_13 = OpTypePointer UniformConstant %type_buffer_image_13 +// CHECK: %type_buffer_image_14 = OpTypeImage %uint Buffer 2 0 0 1 Rgba32ui +// CHECK: %_ptr_UniformConstant_type_buffer_image_14 = OpTypePointer UniformConstant %type_buffer_image_14 Buffer uint3buf; Buffer uint4buf; -// INFER: %type_buffer_image_15 = OpTypeImage %float Buffer 2 0 0 1 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_15 = OpTypePointer UniformConstant %type_buffer_image_15 -// INFER: %type_buffer_image_16 = OpTypeImage %float Buffer 2 0 0 1 Rgba32f -// INFER: %_ptr_UniformConstant_type_buffer_image_16 = OpTypePointer UniformConstant %type_buffer_image_16 +// CHECK: %type_buffer_image_15 = OpTypeImage %float Buffer 2 0 0 1 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_15 = OpTypePointer UniformConstant %type_buffer_image_15 +// CHECK: %type_buffer_image_16 = OpTypeImage %float Buffer 2 0 0 1 Rgba32f +// CHECK: %_ptr_UniformConstant_type_buffer_image_16 = OpTypePointer UniformConstant %type_buffer_image_16 Buffer float3buf; Buffer float4buf; -// INFER: %type_buffer_image_17 = OpTypeImage %int Buffer 2 0 0 2 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_17 = OpTypePointer UniformConstant %type_buffer_image_17 -// INFER: %type_buffer_image_18 = OpTypeImage %int Buffer 2 0 0 2 Rgba32i -// INFER: %_ptr_UniformConstant_type_buffer_image_18 = OpTypePointer UniformConstant %type_buffer_image_18 +// CHECK: %type_buffer_image_17 = OpTypeImage %int Buffer 2 0 0 2 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_17 = OpTypePointer UniformConstant %type_buffer_image_17 +// CHECK: %type_buffer_image_18 = OpTypeImage %int Buffer 2 0 0 2 Rgba32i +// CHECK: %_ptr_UniformConstant_type_buffer_image_18 = OpTypePointer UniformConstant %type_buffer_image_18 RWBuffer int3rwbuf; RWBuffer int4rwbuf; -// INFER: %type_buffer_image_19 = OpTypeImage %uint Buffer 2 0 0 2 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_19 = OpTypePointer UniformConstant %type_buffer_image_19 -// INFER: %type_buffer_image_20 = OpTypeImage %uint Buffer 2 0 0 2 Rgba32ui -// INFER: %_ptr_UniformConstant_type_buffer_image_20 = OpTypePointer UniformConstant %type_buffer_image_20 +// CHECK: %type_buffer_image_19 = OpTypeImage %uint Buffer 2 0 0 2 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_19 = OpTypePointer UniformConstant %type_buffer_image_19 +// CHECK: %type_buffer_image_20 = OpTypeImage %uint Buffer 2 0 0 2 Rgba32ui +// CHECK: %_ptr_UniformConstant_type_buffer_image_20 = OpTypePointer UniformConstant %type_buffer_image_20 RWBuffer uint3rwbuf; RWBuffer uint4rwbuf; -// INFER: %type_buffer_image_21 = OpTypeImage %float Buffer 2 0 0 2 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_21 = OpTypePointer UniformConstant %type_buffer_image_21 -// INFER: %type_buffer_image_22 = OpTypeImage %float Buffer 2 0 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_buffer_image_22 = OpTypePointer UniformConstant %type_buffer_image_22 +// CHECK: %type_buffer_image_21 = OpTypeImage %float Buffer 2 0 0 2 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_21 = OpTypePointer UniformConstant %type_buffer_image_21 +// CHECK: %type_buffer_image_22 = OpTypeImage %float Buffer 2 0 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_buffer_image_22 = OpTypePointer UniformConstant %type_buffer_image_22 RWBuffer float3rwbuf; RWBuffer float4rwbuf; -// INFER: %intbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// INFER: %uintbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// INFER: %floatbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// INFER: %intrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant -// INFER: %uintrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant -// INFER: %floatrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant -// INFER: %int2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_5 UniformConstant -// INFER: %uint2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_6 UniformConstant -// INFER: %float2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_7 UniformConstant -// INFER: %int2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_8 UniformConstant -// INFER: %uint2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_9 UniformConstant -// INFER: %float2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_10 UniformConstant -// INFER: %int3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_11 UniformConstant -// INFER: %int4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_12 UniformConstant -// INFER: %uint3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_13 UniformConstant -// INFER: %uint4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_14 UniformConstant -// INFER: %float3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_15 UniformConstant -// INFER: %float4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_16 UniformConstant -// INFER: %int3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_17 UniformConstant -// INFER: %int4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_18 UniformConstant -// INFER: %uint3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_19 UniformConstant -// INFER: %uint4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_20 UniformConstant -// INFER: %float3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_21 UniformConstant -// INFER: %float4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_22 UniformConstant - -// UNKNOWN: %intbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %uintbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %floatbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %intrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant -// UNKNOWN: %uintrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant -// UNKNOWN: %floatrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant -// UNKNOWN: %int2buf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %uint2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %float2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %int2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant -// UNKNOWN: %uint2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant -// UNKNOWN: %float2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant -// UNKNOWN: %int3buf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %int4buf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %uint3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %uint4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %float3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %float4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %int3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant -// UNKNOWN: %int4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant -// UNKNOWN: %uint3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant -// UNKNOWN: %uint4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant -// UNKNOWN: %float3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant -// UNKNOWN: %float4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant +// CHECK: %intbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant +// CHECK: %uintbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant +// CHECK: %floatbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant +// CHECK: %intrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant +// CHECK: %uintrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant +// CHECK: %floatrwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant +// CHECK: %int2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_5 UniformConstant +// CHECK: %uint2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_6 UniformConstant +// CHECK: %float2buf = OpVariable %_ptr_UniformConstant_type_buffer_image_7 UniformConstant +// CHECK: %int2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_8 UniformConstant +// CHECK: %uint2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_9 UniformConstant +// CHECK: %float2rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_10 UniformConstant +// CHECK: %int3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_11 UniformConstant +// CHECK: %int4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_12 UniformConstant +// CHECK: %uint3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_13 UniformConstant +// CHECK: %uint4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_14 UniformConstant +// CHECK: %float3buf = OpVariable %_ptr_UniformConstant_type_buffer_image_15 UniformConstant +// CHECK: %float4buf = OpVariable %_ptr_UniformConstant_type_buffer_image_16 UniformConstant +// CHECK: %int3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_17 UniformConstant +// CHECK: %int4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_18 UniformConstant +// CHECK: %uint3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_19 UniformConstant +// CHECK: %uint4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_20 UniformConstant +// CHECK: %float3rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_21 UniformConstant +// CHECK: %float4rwbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_22 UniformConstant void main() {} diff --git a/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-buffer.hlsl b/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-buffer.hlsl index 0b576fc5e9..c616f65bb9 100644 --- a/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-buffer.hlsl +++ b/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-buffer.hlsl @@ -1,81 +1,59 @@ -// RUN: %dxc -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,INFER -// RUN: %dxc -fspv-target-env=vulkan1.3 -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN -// RUN: %dxc -fspv-target-env=universal1.5 -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN - -// Before vulkan1.3, we should be trying to infer the image type for because -// we cannot necessarily use Unknown. However in VK1.3 and later, we can use -// Unknown. +// RUN: %dxc -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s // CHECK: OpCapability SampledBuffer -// INFER: OpCapability StorageImageExtendedFormats +// CHECK: OpCapability StorageImageExtendedFormats -// INFER: %type_buffer_image = OpTypeImage %int Buffer 2 0 0 2 R32i -// UNKNOWN: %type_buffer_image = OpTypeImage %int Buffer 2 0 0 2 Unknown +// CHECK: %type_buffer_image = OpTypeImage %int Buffer 2 0 0 2 R32i // CHECK: %_ptr_UniformConstant_type_buffer_image = OpTypePointer UniformConstant %type_buffer_image RasterizerOrderedBuffer introvbuf; -// INFER: %type_buffer_image_0 = OpTypeImage %uint Buffer 2 0 0 2 R32ui -// UNKNOWN: %type_buffer_image_0 = OpTypeImage %uint Buffer 2 0 0 2 Unknown +// CHECK: %type_buffer_image_0 = OpTypeImage %uint Buffer 2 0 0 2 R32ui // CHECK: %_ptr_UniformConstant_type_buffer_image_0 = OpTypePointer UniformConstant %type_buffer_image_0 RasterizerOrderedBuffer uintrovbuf; -// INFER: %type_buffer_image_1 = OpTypeImage %float Buffer 2 0 0 2 R32f -// UNKNOWN: %type_buffer_image_1 = OpTypeImage %float Buffer 2 0 0 2 Unknown +// CHECK: %type_buffer_image_1 = OpTypeImage %float Buffer 2 0 0 2 R32f // CHECK: %_ptr_UniformConstant_type_buffer_image_1 = OpTypePointer UniformConstant %type_buffer_image_1 RasterizerOrderedBuffer floatrovbuf; -// INFER: %type_buffer_image_2 = OpTypeImage %int Buffer 2 0 0 2 Rg32i -// INFER: %_ptr_UniformConstant_type_buffer_image_2 = OpTypePointer UniformConstant %type_buffer_image_2 +// CHECK: %type_buffer_image_2 = OpTypeImage %int Buffer 2 0 0 2 Rg32i +// CHECK: %_ptr_UniformConstant_type_buffer_image_2 = OpTypePointer UniformConstant %type_buffer_image_2 RasterizerOrderedBuffer int2rovbuf; -// INFER: %type_buffer_image_3 = OpTypeImage %uint Buffer 2 0 0 2 Rg32ui -// INFER: %_ptr_UniformConstant_type_buffer_image_3 = OpTypePointer UniformConstant %type_buffer_image_3 +// CHECK: %type_buffer_image_3 = OpTypeImage %uint Buffer 2 0 0 2 Rg32ui +// CHECK: %_ptr_UniformConstant_type_buffer_image_3 = OpTypePointer UniformConstant %type_buffer_image_3 RasterizerOrderedBuffer uint2rovbuf; -// INFER: %type_buffer_image_4 = OpTypeImage %float Buffer 2 0 0 2 Rg32f -// INFER: %_ptr_UniformConstant_type_buffer_image_4 = OpTypePointer UniformConstant %type_buffer_image_4 +// CHECK: %type_buffer_image_4 = OpTypeImage %float Buffer 2 0 0 2 Rg32f +// CHECK: %_ptr_UniformConstant_type_buffer_image_4 = OpTypePointer UniformConstant %type_buffer_image_4 RasterizerOrderedBuffer float2rovbuf; -// INFER: %type_buffer_image_5 = OpTypeImage %int Buffer 2 0 0 2 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_5 = OpTypePointer UniformConstant %type_buffer_image_5 -// INFER: %type_buffer_image_6 = OpTypeImage %int Buffer 2 0 0 2 Rgba32i -// INFER: %_ptr_UniformConstant_type_buffer_image_6 = OpTypePointer UniformConstant %type_buffer_image_6 +// CHECK: %type_buffer_image_5 = OpTypeImage %int Buffer 2 0 0 2 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_5 = OpTypePointer UniformConstant %type_buffer_image_5 +// CHECK: %type_buffer_image_6 = OpTypeImage %int Buffer 2 0 0 2 Rgba32i +// CHECK: %_ptr_UniformConstant_type_buffer_image_6 = OpTypePointer UniformConstant %type_buffer_image_6 RasterizerOrderedBuffer int3rovbuf; RasterizerOrderedBuffer int4rovbuf; -// INFER: %type_buffer_image_7 = OpTypeImage %uint Buffer 2 0 0 2 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_7 = OpTypePointer UniformConstant %type_buffer_image_7 -// INFER: %type_buffer_image_8 = OpTypeImage %uint Buffer 2 0 0 2 Rgba32ui -// INFER: %_ptr_UniformConstant_type_buffer_image_8 = OpTypePointer UniformConstant %type_buffer_image_8 +// CHECK: %type_buffer_image_7 = OpTypeImage %uint Buffer 2 0 0 2 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_7 = OpTypePointer UniformConstant %type_buffer_image_7 +// CHECK: %type_buffer_image_8 = OpTypeImage %uint Buffer 2 0 0 2 Rgba32ui +// CHECK: %_ptr_UniformConstant_type_buffer_image_8 = OpTypePointer UniformConstant %type_buffer_image_8 RasterizerOrderedBuffer uint3rovbuf; RasterizerOrderedBuffer uint4rovbuf; -// INFER: %type_buffer_image_9 = OpTypeImage %float Buffer 2 0 0 2 Unknown -// INFER: %_ptr_UniformConstant_type_buffer_image_9 = OpTypePointer UniformConstant %type_buffer_image_9 -// INFER: %type_buffer_image_10 = OpTypeImage %float Buffer 2 0 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_buffer_image_10 = OpTypePointer UniformConstant %type_buffer_image_10 +// CHECK: %type_buffer_image_9 = OpTypeImage %float Buffer 2 0 0 2 Unknown +// CHECK: %_ptr_UniformConstant_type_buffer_image_9 = OpTypePointer UniformConstant %type_buffer_image_9 +// CHECK: %type_buffer_image_10 = OpTypeImage %float Buffer 2 0 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_buffer_image_10 = OpTypePointer UniformConstant %type_buffer_image_10 RasterizerOrderedBuffer float3rovbuf; RasterizerOrderedBuffer float4rovbuf; -// INFER: %introvbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// INFER: %uintrovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// INFER: %floatrovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// INFER: %int2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant -// INFER: %uint2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant -// INFER: %float2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant -// INFER: %int3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_5 UniformConstant -// INFER: %int4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_6 UniformConstant -// INFER: %uint3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_7 UniformConstant -// INFER: %uint4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_8 UniformConstant -// INFER: %float3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_9 UniformConstant -// INFER: %float4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_10 UniformConstant - -// UNKNOWN: %introvbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %uintrovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %floatrovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %int2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %uint2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %float2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %int3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %int4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant -// UNKNOWN: %uint3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %uint4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant -// UNKNOWN: %float3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant -// UNKNOWN: %float4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant +// CHECK: %introvbuf = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant +// CHECK: %uintrovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_0 UniformConstant +// CHECK: %floatrovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_1 UniformConstant +// CHECK: %int2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_2 UniformConstant +// CHECK: %uint2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_3 UniformConstant +// CHECK: %float2rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_4 UniformConstant +// CHECK: %int3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_5 UniformConstant +// CHECK: %int4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_6 UniformConstant +// CHECK: %uint3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_7 UniformConstant +// CHECK: %uint4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_8 UniformConstant +// CHECK: %float3rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_9 UniformConstant +// CHECK: %float4rovbuf = OpVariable %_ptr_UniformConstant_type_buffer_image_10 UniformConstant void main() {} diff --git a/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-texture.hlsl b/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-texture.hlsl index 21bff421a0..32dd76e6f1 100644 --- a/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-texture.hlsl +++ b/tools/clang/test/CodeGenSPIRV/type.rasterizer-ordered-texture.hlsl @@ -1,28 +1,23 @@ -// RUN: %dxc -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,INFER -// RUN: %dxc -fspv-target-env=vulkan1.3 -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN -// RUN: %dxc -fspv-target-env=universal1.5 -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN +// RUN: %dxc -T ps_6_6 -E main -fcgl %s -spirv | FileCheck %s // CHECK: OpCapability Image1D -// INFER: %type_1d_image = OpTypeImage %int 1D 2 0 0 2 R32i -// UNKNOWN: %type_1d_image = OpTypeImage %int 1D 2 0 0 2 Unknown +// CHECK: %type_1d_image = OpTypeImage %int 1D 2 0 0 2 R32i // CHECK: %_ptr_UniformConstant_type_1d_image = OpTypePointer UniformConstant %type_1d_image -// INFER: %type_2d_image = OpTypeImage %uint 2D 2 0 0 2 Rg32ui -// UNKNOWN: %type_2d_image = OpTypeImage %uint 2D 2 0 0 2 Unknown +// CHECK: %type_2d_image = OpTypeImage %uint 2D 2 0 0 2 Rg32ui // CHECK: %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image -// INFER: %type_3d_image = OpTypeImage %int 3D 2 0 0 2 R32i -// UNKNOWN: %type_3d_image = OpTypeImage %int 3D 2 0 0 2 Unknown +// CHECK: %type_3d_image = OpTypeImage %int 3D 2 0 0 2 R32i // CHECK: %_ptr_UniformConstant_type_3d_image = OpTypePointer UniformConstant %type_3d_image -// INFER: %type_3d_image_0 = OpTypeImage %float 3D 2 0 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_3d_image_0 = OpTypePointer UniformConstant %type_3d_image_0 -// INFER: %type_1d_image_array = OpTypeImage %int 1D 2 1 0 2 R32i -// INFER: %_ptr_UniformConstant_type_1d_image_array = OpTypePointer UniformConstant %type_1d_image_array -// INFER: %type_2d_image_array = OpTypeImage %uint 2D 2 1 0 2 Rg32ui -// INFER: %_ptr_UniformConstant_type_2d_image_array = OpTypePointer UniformConstant %type_2d_image_array -// INFER: %type_1d_image_array_0 = OpTypeImage %float 1D 2 1 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_1d_image_array_0 = OpTypePointer UniformConstant %type_1d_image_array_0 -// INFER: %type_2d_image_array_0 = OpTypeImage %float 2D 2 1 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_2d_image_array_0 = OpTypePointer UniformConstant %type_2d_image_array_0 +// CHECK: %type_3d_image_0 = OpTypeImage %float 3D 2 0 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_3d_image_0 = OpTypePointer UniformConstant %type_3d_image_0 +// CHECK: %type_1d_image_array = OpTypeImage %int 1D 2 1 0 2 R32i +// CHECK: %_ptr_UniformConstant_type_1d_image_array = OpTypePointer UniformConstant %type_1d_image_array +// CHECK: %type_2d_image_array = OpTypeImage %uint 2D 2 1 0 2 Rg32ui +// CHECK: %_ptr_UniformConstant_type_2d_image_array = OpTypePointer UniformConstant %type_2d_image_array +// CHECK: %type_1d_image_array_0 = OpTypeImage %float 1D 2 1 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_1d_image_array_0 = OpTypePointer UniformConstant %type_1d_image_array_0 +// CHECK: %type_2d_image_array_0 = OpTypeImage %float 2D 2 1 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_2d_image_array_0 = OpTypePointer UniformConstant %type_2d_image_array_0 // CHECK: %t1 = OpVariable %_ptr_UniformConstant_type_1d_image UniformConstant @@ -38,8 +33,7 @@ RasterizerOrderedTexture3D t3 ; [[vk::image_format("rgba32f")]] RasterizerOrderedTexture3D t4 ; -// INFER: %t5 = OpVariable %_ptr_UniformConstant_type_3d_image_0 UniformConstant -// UNKNOWN: %t5 = OpVariable %_ptr_UniformConstant_type_3d_image_1 UniformConstant +// CHECK: %t5 = OpVariable %_ptr_UniformConstant_type_3d_image_0 UniformConstant RasterizerOrderedTexture3D t5 ; // CHECK: %t6 = OpVariable %_ptr_UniformConstant_type_1d_image_array UniformConstant diff --git a/tools/clang/test/CodeGenSPIRV/type.rwtexture.hlsl b/tools/clang/test/CodeGenSPIRV/type.rwtexture.hlsl index 884957210a..f901d44cfa 100644 --- a/tools/clang/test/CodeGenSPIRV/type.rwtexture.hlsl +++ b/tools/clang/test/CodeGenSPIRV/type.rwtexture.hlsl @@ -1,43 +1,24 @@ -// RUN: %dxc -T vs_6_0 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,INFER -// RUN: %dxc -fspv-target-env=vulkan1.3 -T vs_6_0 -E main -fcgl %s -spirv | FileCheck %s --check-prefixes=CHECK,UNKNOWN +// RUN: %dxc -T vs_6_0 -E main -fcgl %s -spirv | FileCheck %s // CHECK: OpCapability Image1D -// INFER: %type_1d_image = OpTypeImage %int 1D 2 0 0 2 R32i -// INFER: %_ptr_UniformConstant_type_1d_image = OpTypePointer UniformConstant %type_1d_image -// INFER: %type_2d_image = OpTypeImage %uint 2D 2 0 0 2 Rg32ui -// INFER: %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image -// INFER: %type_3d_image = OpTypeImage %int 3D 2 0 0 2 R32i -// INFER: %_ptr_UniformConstant_type_3d_image = OpTypePointer UniformConstant %type_3d_image -// INFER: %type_3d_image_0 = OpTypeImage %float 3D 2 0 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_3d_image_0 = OpTypePointer UniformConstant %type_3d_image_0 -// INFER: %type_1d_image_array = OpTypeImage %int 1D 2 1 0 2 R32i -// INFER: %_ptr_UniformConstant_type_1d_image_array = OpTypePointer UniformConstant %type_1d_image_array -// INFER: %type_2d_image_array = OpTypeImage %uint 2D 2 1 0 2 Rg32ui -// INFER: %_ptr_UniformConstant_type_2d_image_array = OpTypePointer UniformConstant %type_2d_image_array -// INFER: %type_1d_image_array_0 = OpTypeImage %float 1D 2 1 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_1d_image_array_0 = OpTypePointer UniformConstant %type_1d_image_array_0 -// INFER: %type_2d_image_array_0 = OpTypeImage %float 2D 2 1 0 2 Rgba32f -// INFER: %_ptr_UniformConstant_type_2d_image_array_0 = OpTypePointer UniformConstant %type_2d_image_array_0 +// CHECK: %type_1d_image = OpTypeImage %int 1D 2 0 0 2 R32i +// CHECK: %_ptr_UniformConstant_type_1d_image = OpTypePointer UniformConstant %type_1d_image +// CHECK: %type_2d_image = OpTypeImage %uint 2D 2 0 0 2 Rg32ui +// CHECK: %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +// CHECK: %type_3d_image = OpTypeImage %int 3D 2 0 0 2 R32i +// CHECK: %_ptr_UniformConstant_type_3d_image = OpTypePointer UniformConstant %type_3d_image +// CHECK: %type_3d_image_0 = OpTypeImage %float 3D 2 0 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_3d_image_0 = OpTypePointer UniformConstant %type_3d_image_0 +// CHECK: %type_1d_image_array = OpTypeImage %int 1D 2 1 0 2 R32i +// CHECK: %_ptr_UniformConstant_type_1d_image_array = OpTypePointer UniformConstant %type_1d_image_array +// CHECK: %type_2d_image_array = OpTypeImage %uint 2D 2 1 0 2 Rg32ui +// CHECK: %_ptr_UniformConstant_type_2d_image_array = OpTypePointer UniformConstant %type_2d_image_array +// CHECK: %type_1d_image_array_0 = OpTypeImage %float 1D 2 1 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_1d_image_array_0 = OpTypePointer UniformConstant %type_1d_image_array_0 +// CHECK: %type_2d_image_array_0 = OpTypeImage %float 2D 2 1 0 2 Rgba32f +// CHECK: %_ptr_UniformConstant_type_2d_image_array_0 = OpTypePointer UniformConstant %type_2d_image_array_0 -// UNKNOWN: %type_1d_image = OpTypeImage %int 1D 2 0 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_1d_image = OpTypePointer UniformConstant %type_1d_image -// UNKNOWN: %type_2d_image = OpTypeImage %uint 2D 2 0 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image -// UNKNOWN: %type_3d_image = OpTypeImage %int 3D 2 0 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_3d_image = OpTypePointer UniformConstant %type_3d_image -// UNKNOWN: %type_3d_image_0 = OpTypeImage %float 3D 2 0 0 2 Rgba32f -// UNKNOWN: %_ptr_UniformConstant_type_3d_image_0 = OpTypePointer UniformConstant %type_3d_image_0 -// UNKNOWN: %type_3d_image_1 = OpTypeImage %float 3D 2 0 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_3d_image_1 = OpTypePointer UniformConstant %type_3d_image_1 -// UNKNOWN: %type_1d_image_array = OpTypeImage %int 1D 2 1 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_1d_image_array = OpTypePointer UniformConstant %type_1d_image_array -// UNKNOWN: %type_2d_image_array = OpTypeImage %uint 2D 2 1 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_2d_image_array = OpTypePointer UniformConstant %type_2d_image_array -// UNKNOWN: %type_1d_image_array_0 = OpTypeImage %float 1D 2 1 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_1d_image_array_0 = OpTypePointer UniformConstant %type_1d_image_array_0 -// UNKNOWN: %type_2d_image_array_0 = OpTypeImage %float 2D 2 1 0 2 Unknown -// UNKNOWN: %_ptr_UniformConstant_type_2d_image_array_0 = OpTypePointer UniformConstant %type_2d_image_array_0 // CHECK: %t1 = OpVariable %_ptr_UniformConstant_type_1d_image UniformConstant RWTexture1D t1 ; @@ -52,8 +33,7 @@ RWTexture3D t3 ; [[vk::image_format("rgba32f")]] RWTexture3D t4 ; -// INFER: %t5 = OpVariable %_ptr_UniformConstant_type_3d_image_0 UniformConstant -// UNKNOWN: %t5 = OpVariable %_ptr_UniformConstant_type_3d_image_1 UniformConstant +// CHECK: %t5 = OpVariable %_ptr_UniformConstant_type_3d_image_0 UniformConstant RWTexture3D t5 ; // CHECK: %t6 = OpVariable %_ptr_UniformConstant_type_1d_image_array UniformConstant