[clang] [HLSL] Add `InterlockedMax` function and resource methods (PR #222160)
Finn Plummer via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 11:50:14 PDT 2026
================
@@ -11,11 +11,11 @@
// LangAS::hlsl_device branch of the dest-argument address-space check in
// SemaHLSL and ensures the atomicrmw is emitted on the pointer returned by
// resource.getpointer for a TypedBuffer (as opposed to the RawBuffer path
-// covered by the ByteAddressBuffer tests). InterlockedMin is called once on
-// a signed buffer and once on an unsigned buffer so that the signed/unsigned
-// atomicrmw selection is pinned to an exactly-named resource handle type
-// (spirv.SignedImage vs spirv.Image). Add new intrinsics here as more
-// InterlockedX operations gain resource support.
+// covered by the ByteAddressBuffer tests). InterlockedMin and InterlockedMax
+// are each called once on a signed buffer and once on an unsigned buffer so
+// that the signed/unsigned atomicrmw selection is pinned to an exactly-named
+// resource handle type (spirv.SignedImage vs spirv.Image). Add new intrinsics
+// here as more InterlockedX operations gain resource support.
----------------
inbelic wrote:
`clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl` seems to indicate we should also be supporting the intrinsic for textures? "Add new intrinsics here as more InterlockedX operations gain resource support"
https://github.com/llvm/llvm-project/pull/222160
More information about the cfe-commits
mailing list