File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ class MatrixBitcastLowerPass : public FunctionPass {
8484
8585 StringRef getPassName () const override { return " Matrix Bitcast lower" ; }
8686 bool runOnFunction (Function &F) override {
87- if ( F.getParent ()->HasDxilModule ())
88- SupportsVectors =
89- F. getParent ()-> GetDxilModule (). GetShaderModel ()-> IsSM69Plus ();
87+ DxilModule &DM = F.getParent ()->GetOrCreateDxilModule ();
88+ SupportsVectors = DM. GetShaderModel ()-> IsSM69Plus ();
89+
9090 bool bUpdated = false ;
9191 std::unordered_set<BitCastInst *> matCastSet;
9292 for (auto blkIt = F.begin (); blkIt != F.end (); ++blkIt) {
@@ -104,7 +104,6 @@ class MatrixBitcastLowerPass : public FunctionPass {
104104 }
105105 }
106106
107- DxilModule &DM = F.getParent ()->GetOrCreateDxilModule ();
108107 // Remove bitcast which has CallInst user.
109108 if (DM.GetShaderModel ()->IsLib ()) {
110109 for (auto it = matCastSet.begin (); it != matCastSet.end ();) {
You can’t perform that action at this time.
0 commit comments