@@ -540,23 +540,25 @@ static void initializeBufferFromBinding(CodeGenModule &CGM,
540
540
llvm::GlobalVariable *GV,
541
541
HLSLResourceBindingAttr *RBA) {
542
542
llvm::Type *Int1Ty = llvm::Type::getInt1Ty (CGM.getLLVMContext ());
543
- auto *False = llvm::ConstantInt::get (Int1Ty, false );
544
- auto *Zero = llvm::ConstantInt::get (CGM.IntTy , 0 );
545
- auto *One = llvm::ConstantInt::get (CGM.IntTy , 1 );
543
+ auto *NonUniform = llvm::ConstantInt::get (Int1Ty, false );
544
+ auto *Index = llvm::ConstantInt::get (CGM.IntTy , 0 );
545
+ auto *RangeSize = llvm::ConstantInt::get (CGM.IntTy , 1 );
546
546
auto *Space =
547
547
llvm::ConstantInt::get (CGM.IntTy , RBA ? RBA->getSpaceNumber () : 0 );
548
548
549
549
if (RBA->hasRegisterSlot ()) {
550
550
auto *RegSlot = llvm::ConstantInt::get (CGM.IntTy , RBA->getSlotNumber ());
551
551
Intrinsic::ID Intr =
552
552
CGM.getHLSLRuntime ().getCreateHandleFromBindingIntrinsic ();
553
- initializeBuffer (CGM, GV, Intr, {Space, RegSlot, One, Zero, False});
553
+ initializeBuffer (CGM, GV, Intr,
554
+ {Space, RegSlot, RangeSize, Index, NonUniform});
554
555
} else {
555
556
auto *OrderID =
556
557
llvm::ConstantInt::get (CGM.IntTy , RBA->getImplicitBindingOrderID ());
557
558
Intrinsic::ID Intr =
558
559
CGM.getHLSLRuntime ().getCreateHandleFromImplicitBindingIntrinsic ();
559
- initializeBuffer (CGM, GV, Intr, {OrderID, Space, One, Zero, False});
560
+ initializeBuffer (CGM, GV, Intr,
561
+ {OrderID, Space, RangeSize, Index, NonUniform});
560
562
}
561
563
}
562
564
0 commit comments