[llvm-branch-commits] [DirectX] Lower `@llvm.dx.handle.fromBinding` to DXIL ops (PR #104251)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 23 12:15:46 PDT 2024


================
@@ -683,6 +685,14 @@ def Dot4 :  DXILOp<56, dot4> {
   let attributes = [Attributes<DXIL1_0, [ReadNone]>];
 }
 
+def CreateHandle : DXILOp<57, createHandle> {
+  let Doc = "creates the handle to a resource";
+  // ResourceClass, RangeID, Index, NonUniform
+  let arguments = [Int8Ty, Int32Ty, Int32Ty, Int1Ty];
+  let result = HandleTy;
+  let stages = [Stages<DXIL1_0, [all_stages]>];
----------------
bogner wrote:

Yeah that sounds right. I've added `Stages<DXIL1_6, [removed]>` to indicate this, but there doesn't really seem to be a good way to test this - since we have logic that checks the dxil version before deciding what to lower to, it's just impossible to generate the wrong one.

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


More information about the llvm-branch-commits mailing list