Skip to content

Commit 9104623

Browse files
committed
Fix deleted rayQueryHandle from HitObject_FromRayQuery from bad merge
1 parent e85b327 commit 9104623

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

include/dxc/DXIL/DxilInstructions.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8949,12 +8949,19 @@ struct DxilInst_HitObject_FromRayQuery {
89498949
// Validation support
89508950
bool isAllowed() const { return true; }
89518951
bool isArgumentListValid() const {
8952-
if (1 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands())
8952+
if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands())
89538953
return false;
89548954
return true;
89558955
}
89568956
// Metadata
89578957
bool requiresUniformInputs() const { return false; }
8958+
// Operand indexes
8959+
enum OperandIdx {
8960+
arg_rayQueryHandle = 1,
8961+
};
8962+
// Accessors
8963+
llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
8964+
void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
89588965
};
89598966

89608967
/// This instruction Creates a new HitObject representing a committed hit from a

lib/DXIL/DxilOperations.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5657,6 +5657,7 @@ Function *OP::GetOpFunc(OpCode opCode, Type *pOverloadType) {
56575657
case OpCode::HitObject_FromRayQuery:
56585658
A(pHit);
56595659
A(pI32);
5660+
A(pI32);
56605661
break;
56615662
case OpCode::HitObject_FromRayQueryWithAttrs:
56625663
A(pHit);

utils/hct/hctdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5825,6 +5825,7 @@ def UFI(name, **mappings):
58255825
db_dxil_param(
58265826
0, "hit_object", "", "HitObject created from RayQuery object"
58275827
),
5828+
db_dxil_param(2, "i32", "rayQueryHandle", "RayQuery handle"),
58285829
],
58295830
)
58305831
next_op_idx += 1

0 commit comments

Comments
 (0)