[clang] [llvm] [HLSL][SPIRV] Reject textures and typed buffers with 16-bit or double elements on Vulkan (PR #243566)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 12:03:43 PST 2026


================
@@ -355,6 +355,13 @@ integer instead of unsigned. This is required because llvm-ir will create the
 same sampled type for signed and unsigned integers. If the image format is
 unknown, the backend cannot distinguish the two case.
 
+When targeting Vulkan, the Sampled Type of every `OpTypeImage`, sampled or
+storage, must be a scalar 32-bit float, 32-bit integer or 64-bit integer
+([VUID-StandaloneSpirv-OpTypeImage-04656][vulkan-image-sampled-type]). The
+backend reports an error for any other Sampled Type, whichever frontend produced
+the LLVM IR. Other target environments are not affected; OpenCL images, for
+example, use a `void` Sampled Type.
----------------
bogner wrote:

I don't think the text about the backend reporting an error are really adding anything - just saying vulkan requires these types as the first sentence already does is sufficient.

https://github.com/llvm/llvm-project/pull/243566


More information about the cfe-commits mailing list