Change rangeID parameter for CreateHandle to const (#833)
This commit is contained in:
Родитель
92c66ed574
Коммит
77594e8624
|
@ -2190,6 +2190,8 @@ struct DxilInst_CreateHandle {
|
|||
void set_resourceClass_val(int8_t val) { Instr->setOperand(1, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
||||
llvm::Value *get_rangeId() const { return Instr->getOperand(2); }
|
||||
void set_rangeId(llvm::Value *val) { Instr->setOperand(2, val); }
|
||||
int32_t get_rangeId_val() const { return (int32_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
||||
void set_rangeId_val(int32_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 32), llvm::APInt(32, (uint64_t)val))); }
|
||||
llvm::Value *get_index() const { return Instr->getOperand(3); }
|
||||
void set_index(llvm::Value *val) { Instr->setOperand(3, val); }
|
||||
llvm::Value *get_nonUniformIndex() const { return Instr->getOperand(4); }
|
||||
|
|
|
@ -547,7 +547,7 @@ class db_dxil(object):
|
|||
self.add_dxil_op("CreateHandle", next_op_idx, "CreateHandle", "creates the handle to a resource", "v", "ro", [
|
||||
db_dxil_param(0, "res", "", "the handle to the resource"),
|
||||
db_dxil_param(2, "i8", "resourceClass", "the class of resource to create (SRV, UAV, CBuffer, Sampler)", is_const=True), # maps to DxilResourceBase::Class
|
||||
db_dxil_param(3, "i32", "rangeId", "range identifier for resource"),
|
||||
db_dxil_param(3, "i32", "rangeId", "range identifier for resource", is_const=True),
|
||||
db_dxil_param(4, "i32", "index", "zero-based index into range"),
|
||||
db_dxil_param(5, "i1", "nonUniformIndex", "non-uniform resource index", is_const=True)])
|
||||
next_op_idx += 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче