@@ -10744,7 +10744,7 @@ struct DxilInst_LinAlgMatVecMul {
1074410744 // Validation support
1074510745 bool isAllowed () const { return true ; }
1074610746 bool isArgumentListValid () const {
10747- if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
10747+ if (5 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
1074810748 return false ;
1074910749 return true ;
1075010750 }
@@ -10753,16 +10753,19 @@ struct DxilInst_LinAlgMatVecMul {
1075310753 // Operand indexes
1075410754 enum OperandIdx {
1075510755 arg_matrix = 1 ,
10756- arg_inputVector = 2 ,
10757- arg_interpretation = 3 ,
10756+ arg_isOutputSigned = 2 ,
10757+ arg_inputVector = 3 ,
10758+ arg_interpretation = 4 ,
1075810759 };
1075910760 // Accessors
1076010761 llvm::Value *get_matrix () const { return Instr->getOperand (1 ); }
1076110762 void set_matrix (llvm::Value *val) { Instr->setOperand (1 , val); }
10762- llvm::Value *get_inputVector () const { return Instr->getOperand (2 ); }
10763- void set_inputVector (llvm::Value *val) { Instr->setOperand (2 , val); }
10764- llvm::Value *get_interpretation () const { return Instr->getOperand (3 ); }
10765- void set_interpretation (llvm::Value *val) { Instr->setOperand (3 , val); }
10763+ llvm::Value *get_isOutputSigned () const { return Instr->getOperand (2 ); }
10764+ void set_isOutputSigned (llvm::Value *val) { Instr->setOperand (2 , val); }
10765+ llvm::Value *get_inputVector () const { return Instr->getOperand (3 ); }
10766+ void set_inputVector (llvm::Value *val) { Instr->setOperand (3 , val); }
10767+ llvm::Value *get_interpretation () const { return Instr->getOperand (4 ); }
10768+ void set_interpretation (llvm::Value *val) { Instr->setOperand (4 , val); }
1076610769};
1076710770
1076810771// / This instruction Multiplies a MxK dimension matrix and a K sized input
@@ -10778,7 +10781,7 @@ struct DxilInst_LinAlgMatVecMulAdd {
1077810781 // Validation support
1077910782 bool isAllowed () const { return true ; }
1078010783 bool isArgumentListValid () const {
10781- if (6 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
10784+ if (7 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
1078210785 return false ;
1078310786 return true ;
1078410787 }
@@ -10787,22 +10790,25 @@ struct DxilInst_LinAlgMatVecMulAdd {
1078710790 // Operand indexes
1078810791 enum OperandIdx {
1078910792 arg_matrix = 1 ,
10790- arg_inputVector = 2 ,
10791- arg_inputInterpretation = 3 ,
10792- arg_biasVector = 4 ,
10793- arg_biasInterpretation = 5 ,
10793+ arg_isOutputSigned = 2 ,
10794+ arg_inputVector = 3 ,
10795+ arg_inputInterpretation = 4 ,
10796+ arg_biasVector = 5 ,
10797+ arg_biasInterpretation = 6 ,
1079410798 };
1079510799 // Accessors
1079610800 llvm::Value *get_matrix () const { return Instr->getOperand (1 ); }
1079710801 void set_matrix (llvm::Value *val) { Instr->setOperand (1 , val); }
10798- llvm::Value *get_inputVector () const { return Instr->getOperand (2 ); }
10799- void set_inputVector (llvm::Value *val) { Instr->setOperand (2 , val); }
10800- llvm::Value *get_inputInterpretation () const { return Instr->getOperand (3 ); }
10801- void set_inputInterpretation (llvm::Value *val) { Instr->setOperand (3 , val); }
10802- llvm::Value *get_biasVector () const { return Instr->getOperand (4 ); }
10803- void set_biasVector (llvm::Value *val) { Instr->setOperand (4 , val); }
10804- llvm::Value *get_biasInterpretation () const { return Instr->getOperand (5 ); }
10805- void set_biasInterpretation (llvm::Value *val) { Instr->setOperand (5 , val); }
10802+ llvm::Value *get_isOutputSigned () const { return Instr->getOperand (2 ); }
10803+ void set_isOutputSigned (llvm::Value *val) { Instr->setOperand (2 , val); }
10804+ llvm::Value *get_inputVector () const { return Instr->getOperand (3 ); }
10805+ void set_inputVector (llvm::Value *val) { Instr->setOperand (3 , val); }
10806+ llvm::Value *get_inputInterpretation () const { return Instr->getOperand (4 ); }
10807+ void set_inputInterpretation (llvm::Value *val) { Instr->setOperand (4 , val); }
10808+ llvm::Value *get_biasVector () const { return Instr->getOperand (5 ); }
10809+ void set_biasVector (llvm::Value *val) { Instr->setOperand (5 , val); }
10810+ llvm::Value *get_biasInterpretation () const { return Instr->getOperand (6 ); }
10811+ void set_biasInterpretation (llvm::Value *val) { Instr->setOperand (6 , val); }
1080610812};
1080710813
1080810814// / This instruction accumulates a matrix to a RWByteAddressBuffer
@@ -10920,6 +10926,40 @@ struct DxilInst_LinAlgMatrixOuterProduct {
1092010926 void set_vectorB (llvm::Value *val) { Instr->setOperand (2 , val); }
1092110927};
1092210928
10929+ // / This instruction Convert vector components from one interpretation to
10930+ // / another
10931+ struct DxilInst_LinAlgConvert {
10932+ llvm::Instruction *Instr;
10933+ // Construction and identification
10934+ DxilInst_LinAlgConvert (llvm::Instruction *pInstr) : Instr(pInstr) {}
10935+ operator bool () const {
10936+ return hlsl::OP::IsDxilOpFuncCallInst (Instr,
10937+ hlsl::OP::OpCode::LinAlgConvert);
10938+ }
10939+ // Validation support
10940+ bool isAllowed () const { return true ; }
10941+ bool isArgumentListValid () const {
10942+ if (4 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands ())
10943+ return false ;
10944+ return true ;
10945+ }
10946+ // Metadata
10947+ bool requiresUniformInputs () const { return false ; }
10948+ // Operand indexes
10949+ enum OperandIdx {
10950+ arg_inputVector = 1 ,
10951+ arg_inputInterpretation = 2 ,
10952+ arg_outputInterpretation = 3 ,
10953+ };
10954+ // Accessors
10955+ llvm::Value *get_inputVector () const { return Instr->getOperand (1 ); }
10956+ void set_inputVector (llvm::Value *val) { Instr->setOperand (1 , val); }
10957+ llvm::Value *get_inputInterpretation () const { return Instr->getOperand (2 ); }
10958+ void set_inputInterpretation (llvm::Value *val) { Instr->setOperand (2 , val); }
10959+ llvm::Value *get_outputInterpretation () const { return Instr->getOperand (3 ); }
10960+ void set_outputInterpretation (llvm::Value *val) { Instr->setOperand (3 , val); }
10961+ };
10962+
1092310963// / This instruction triggers a breakpoint if a debugger is attached
1092410964struct DxilInst_DebugBreak {
1092510965 llvm::Instruction *Instr;
0 commit comments