[clang] [llvm] [DirectX] Calculate resource binding offsets using the lower bound (PR #117303)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 14:09:57 PST 2024


================
@@ -588,7 +588,7 @@ llvm::Function *CGHLSLRuntime::createResourceBindingInitFn() {
       auto *Slot = llvm::ConstantInt::get(CGM.IntTy, RBA->getSlotNumber());
       // FIXME: resource arrays are not yet implemented
       auto *Range = llvm::ConstantInt::get(CGM.IntTy, 1);
-      auto *Index = llvm::ConstantInt::get(CGM.IntTy, 0);
+      auto *Index = llvm::ConstantInt::get(CGM.IntTy, RBA->getSlotNumber());
----------------
bogner wrote:

I've changed this to do the translation in the backend.

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


More information about the llvm-commits mailing list