[llvm-branch-commits] [DirectX] Lower `@llvm.dx.typedBufferLoad` to DXIL ops (PR #104252)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 29 17:44:48 PDT 2024


================
@@ -683,6 +686,17 @@ def CreateHandle : DXILOp<57, createHandle> {
   let stages = [Stages<DXIL1_0, [all_stages]>];
 }
 
+def BufferLoad : DXILOp<68, bufferLoad> {
+  let Doc = "reads from a TypedBuffer";
+  // Handle, Coord0, Coord1
+  let arguments = [HandleTy, Int32Ty, Int32Ty];
+  let result = OverloadTy;
+  let overloads =
+      [Overloads<DXIL1_0,
+                 [ResRetHalfTy, ResRetFloatTy, ResRetInt16Ty, ResRetInt32Ty]>];
----------------
bogner wrote:

My understanding from a discussion about this quite a while ago was that 16 bit types are valid DXIL retroactively to DXIL 1.0 but it isn't actually possible to enable 16 bit types until circa SM6.2 / DXIL 1.2. I'm not 100% about that though.

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


More information about the llvm-branch-commits mailing list