================ @@ -539,19 +537,27 @@ static void initializeBuffer(CodeGenModule &CGM, llvm::GlobalVariable *GV, } static void initializeBufferFromBinding(CodeGenModule &CGM, - llvm::GlobalVariable *GV, unsigned Slot, - unsigned Space) { + llvm::GlobalVariable *GV, + HLSLResourceBindingAttr *RBA) { llvm::Type *Int1Ty = llvm::Type::getInt1Ty(CGM.getLLVMContext()); - llvm::Value *Args[] = { - llvm::ConstantInt::get(CGM.IntTy, Space), /* reg_space */ - llvm::ConstantInt::get(CGM.IntTy, Slot), /* lower_bound */ - llvm::ConstantInt::get(CGM.IntTy, 1), /* range_size */ - llvm::ConstantInt::get(CGM.IntTy, 0), /* index */ - llvm::ConstantInt::get(Int1Ty, false) /* non-uniform */ - }; - initializeBuffer(CGM, GV, - CGM.getHLSLRuntime().getCreateHandleFromBindingIntrinsic(), - Args); + auto *False = llvm::ConstantInt::get(Int1Ty, false); + auto *Zero = llvm::ConstantInt::get(CGM.IntTy, 0); + auto *One = llvm::ConstantInt::get(CGM.IntTy, 1); ---------------- bogner wrote:
Shouldn't these be called `NonUniform`, `Index`, and `RangeSize`? Naming these after their values isn't very helpful. https://github.com/llvm/llvm-project/pull/139022 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits