|
@@ -5550,7 +5550,7 @@ struct DxilInst_WaveMultiPrefixBitCount {
|
|
void set_mask3(llvm::Value *val) { Instr->setOperand(5, val); }
|
|
void set_mask3(llvm::Value *val) { Instr->setOperand(5, val); }
|
|
};
|
|
};
|
|
|
|
|
|
-/// This instruction allocate space for RayQuery and return handle
|
|
|
|
|
|
+/// This instruction allocates space for RayQuery and return handle
|
|
struct DxilInst_AllocateRayQuery {
|
|
struct DxilInst_AllocateRayQuery {
|
|
llvm::Instruction *Instr;
|
|
llvm::Instruction *Instr;
|
|
// Construction and identification
|
|
// Construction and identification
|
|
@@ -5577,13 +5577,13 @@ struct DxilInst_AllocateRayQuery {
|
|
void set_constRayFlags_val(uint32_t val) { Instr->setOperand(1, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 32), llvm::APInt(32, (uint64_t)val))); }
|
|
void set_constRayFlags_val(uint32_t val) { Instr->setOperand(1, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 32), llvm::APInt(32, (uint64_t)val))); }
|
|
};
|
|
};
|
|
|
|
|
|
-/// This instruction initialize RayQuery for raytrace
|
|
|
|
-struct DxilInst_TraceRayInline {
|
|
|
|
|
|
+/// This instruction initializes RayQuery for raytrace
|
|
|
|
+struct DxilInst_RayQuery_TraceRayInline {
|
|
llvm::Instruction *Instr;
|
|
llvm::Instruction *Instr;
|
|
// Construction and identification
|
|
// Construction and identification
|
|
- DxilInst_TraceRayInline(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
|
|
+ DxilInst_RayQuery_TraceRayInline(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
operator bool() const {
|
|
operator bool() const {
|
|
- return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::TraceRayInline);
|
|
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_TraceRayInline);
|
|
}
|
|
}
|
|
// Validation support
|
|
// Validation support
|
|
bool isAllowed() const { return true; }
|
|
bool isAllowed() const { return true; }
|
|
@@ -5634,5 +5634,897 @@ struct DxilInst_TraceRayInline {
|
|
llvm::Value *get_tMax() const { return Instr->getOperand(12); }
|
|
llvm::Value *get_tMax() const { return Instr->getOperand(12); }
|
|
void set_tMax(llvm::Value *val) { Instr->setOperand(12, val); }
|
|
void set_tMax(llvm::Value *val) { Instr->setOperand(12, val); }
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+/// This instruction advances a ray query
|
|
|
|
+struct DxilInst_RayQuery_Proceed {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_Proceed(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_Proceed);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction aborts a ray query
|
|
|
|
+struct DxilInst_RayQuery_Abort {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_Abort(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_Abort);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction commits a non opaque triangle hit
|
|
|
|
+struct DxilInst_RayQuery_CommitNonOpaqueTriangleHit {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommitNonOpaqueTriangleHit(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommitNonOpaqueTriangleHit);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction commits a procedural primitive hit
|
|
|
|
+struct DxilInst_RayQuery_CommitProceduralPrimitiveHit {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommitProceduralPrimitiveHit(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommitProceduralPrimitiveHit);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_t = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_t() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_t(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns uint status (COMMITTED_STATUS) of the committed hit in a ray query
|
|
|
|
+struct DxilInst_RayQuery_CommittedStatus {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedStatus(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedStatus);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns uint candidate type (CANDIDATE_TYPE) of the current hit candidate in a ray query, after Proceed() has returned true
|
|
|
|
+struct DxilInst_RayQuery_CandidateType {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateType(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateType);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns matrix for transforming from object-space to world-space for a candidate hit.
|
|
|
|
+struct DxilInst_RayQuery_CandidateObjectToWorld3x4 {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateObjectToWorld3x4(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateObjectToWorld3x4);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_row = 2,
|
|
|
|
+ arg_col = 3,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_row() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_row(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ llvm::Value *get_col() const { return Instr->getOperand(3); }
|
|
|
|
+ void set_col(llvm::Value *val) { Instr->setOperand(3, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns matrix for transforming from world-space to object-space for a candidate hit.
|
|
|
|
+struct DxilInst_RayQuery_CandidateWorldToObject3x4 {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateWorldToObject3x4(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateWorldToObject3x4);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_row = 2,
|
|
|
|
+ arg_col = 3,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_row() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_row(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ llvm::Value *get_col() const { return Instr->getOperand(3); }
|
|
|
|
+ void set_col(llvm::Value *val) { Instr->setOperand(3, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns matrix for transforming from object-space to world-space for a Committed hit.
|
|
|
|
+struct DxilInst_RayQuery_CommittedObjectToWorld3x4 {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedObjectToWorld3x4(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedObjectToWorld3x4);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_row = 2,
|
|
|
|
+ arg_col = 3,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_row() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_row(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ llvm::Value *get_col() const { return Instr->getOperand(3); }
|
|
|
|
+ void set_col(llvm::Value *val) { Instr->setOperand(3, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns matrix for transforming from world-space to object-space for a Committed hit.
|
|
|
|
+struct DxilInst_RayQuery_CommittedWorldToObject3x4 {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedWorldToObject3x4(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedWorldToObject3x4);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_row = 2,
|
|
|
|
+ arg_col = 3,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_row() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_row(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ llvm::Value *get_col() const { return Instr->getOperand(3); }
|
|
|
|
+ void set_col(llvm::Value *val) { Instr->setOperand(3, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns if current candidate procedural primitive is non opaque
|
|
|
|
+struct DxilInst_RayQuery_CandidateProceduralPrimitiveNonOpaque {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateProceduralPrimitiveNonOpaque(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateProceduralPrimitiveNonOpaque);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns if current candidate triangle is front facing
|
|
|
|
+struct DxilInst_RayQuery_CandidateTriangleFrontFace {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateTriangleFrontFace(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateTriangleFrontFace);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns if current committed triangle is front facing
|
|
|
|
+struct DxilInst_RayQuery_CommittedTriangleFrontFace {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedTriangleFrontFace(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedTriangleFrontFace);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate triangle hit barycentrics
|
|
|
|
+struct DxilInst_RayQuery_CandidateTriangleBarycentrics {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateTriangleBarycentrics(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateTriangleBarycentrics);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed triangle hit barycentrics
|
|
|
|
+struct DxilInst_RayQuery_CommittedTriangleBarycentrics {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedTriangleBarycentrics(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedTriangleBarycentrics);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns ray flags
|
|
|
|
+struct DxilInst_RayQuery_RayFlags {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_RayFlags(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_RayFlags);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns world ray origin
|
|
|
|
+struct DxilInst_RayQuery_WorldRayOrigin {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_WorldRayOrigin(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_WorldRayOrigin);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns world ray direction
|
|
|
|
+struct DxilInst_RayQuery_WorldRayDirection {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_WorldRayDirection(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_WorldRayDirection);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns float representing the parametric starting point for the ray.
|
|
|
|
+struct DxilInst_RayQuery_RayTMin {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_RayTMin(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_RayTMin);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns float representing the parametric point on the ray for the current candidate triangle hit.
|
|
|
|
+struct DxilInst_RayQuery_CandidateTriangleRayT {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateTriangleRayT(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateTriangleRayT);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns float representing the parametric point on the ray for the current committed hit.
|
|
|
|
+struct DxilInst_RayQuery_CommittedRayT {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedRayT(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedRayT);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate hit instance index
|
|
|
|
+struct DxilInst_RayQuery_CandidateInstanceIndex {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateInstanceIndex(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateInstanceIndex);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate hit instance ID
|
|
|
|
+struct DxilInst_RayQuery_CandidateInstanceID {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateInstanceID(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateInstanceID);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate hit geometry index
|
|
|
|
+struct DxilInst_RayQuery_CandidateGeometryIndex {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateGeometryIndex(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateGeometryIndex);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate hit geometry index
|
|
|
|
+struct DxilInst_RayQuery_CandidatePrimitiveIndex {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidatePrimitiveIndex(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidatePrimitiveIndex);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate hit object ray origin
|
|
|
|
+struct DxilInst_RayQuery_CandidateObjectRayOrigin {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateObjectRayOrigin(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateObjectRayOrigin);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns candidate object ray direction
|
|
|
|
+struct DxilInst_RayQuery_CandidateObjectRayDirection {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CandidateObjectRayDirection(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CandidateObjectRayDirection);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed hit instance index
|
|
|
|
+struct DxilInst_RayQuery_CommittedInstanceIndex {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedInstanceIndex(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedInstanceIndex);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed hit instance ID
|
|
|
|
+struct DxilInst_RayQuery_CommittedInstanceID {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedInstanceID(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedInstanceID);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed hit geometry index
|
|
|
|
+struct DxilInst_RayQuery_CommittedGeometryIndex {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedGeometryIndex(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedGeometryIndex);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed hit geometry index
|
|
|
|
+struct DxilInst_RayQuery_CommittedPrimitiveIndex {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedPrimitiveIndex(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedPrimitiveIndex);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (2 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed hit object ray origin
|
|
|
|
+struct DxilInst_RayQuery_CommittedObjectRayOrigin {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedObjectRayOrigin(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedObjectRayOrigin);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/// This instruction returns committed object ray direction
|
|
|
|
+struct DxilInst_RayQuery_CommittedObjectRayDirection {
|
|
|
|
+ llvm::Instruction *Instr;
|
|
|
|
+ // Construction and identification
|
|
|
|
+ DxilInst_RayQuery_CommittedObjectRayDirection(llvm::Instruction *pInstr) : Instr(pInstr) {}
|
|
|
|
+ operator bool() const {
|
|
|
|
+ return hlsl::OP::IsDxilOpFuncCallInst(Instr, hlsl::OP::OpCode::RayQuery_CommittedObjectRayDirection);
|
|
|
|
+ }
|
|
|
|
+ // Validation support
|
|
|
|
+ bool isAllowed() const { return true; }
|
|
|
|
+ bool isArgumentListValid() const {
|
|
|
|
+ if (3 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands()) return false;
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // Metadata
|
|
|
|
+ bool requiresUniformInputs() const { return false; }
|
|
|
|
+ // Operand indexes
|
|
|
|
+ enum OperandIdx {
|
|
|
|
+ arg_rayQueryHandle = 1,
|
|
|
|
+ arg_component = 2,
|
|
|
|
+ };
|
|
|
|
+ // Accessors
|
|
|
|
+ llvm::Value *get_rayQueryHandle() const { return Instr->getOperand(1); }
|
|
|
|
+ void set_rayQueryHandle(llvm::Value *val) { Instr->setOperand(1, val); }
|
|
|
|
+ llvm::Value *get_component() const { return Instr->getOperand(2); }
|
|
|
|
+ void set_component(llvm::Value *val) { Instr->setOperand(2, val); }
|
|
|
|
+ int8_t get_component_val() const { return (int8_t)(llvm::dyn_cast<llvm::ConstantInt>(Instr->getOperand(2))->getZExtValue()); }
|
|
|
|
+ void set_component_val(int8_t val) { Instr->setOperand(2, llvm::Constant::getIntegerValue(llvm::IntegerType::get(Instr->getContext(), 8), llvm::APInt(8, (uint64_t)val))); }
|
|
|
|
+};
|
|
// INSTR-HELPER:END
|
|
// INSTR-HELPER:END
|
|
} // namespace hlsl
|
|
} // namespace hlsl
|