diff options
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index ec802e02c..de9d633e2 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp | |||
| @@ -164,14 +164,12 @@ private: | |||
| 164 | 164 | ||
| 165 | void TexturePass(Environment& env, IR::Program& program) { | 165 | void TexturePass(Environment& env, IR::Program& program) { |
| 166 | TextureInstVector to_replace; | 166 | TextureInstVector to_replace; |
| 167 | for (IR::Function& function : program.functions) { | 167 | for (IR::Block* const block : program.post_order_blocks) { |
| 168 | for (IR::Block* const block : function.post_order_blocks) { | 168 | for (IR::Inst& inst : block->Instructions()) { |
| 169 | for (IR::Inst& inst : block->Instructions()) { | 169 | if (!IsTextureInstruction(inst)) { |
| 170 | if (!IsTextureInstruction(inst)) { | 170 | continue; |
| 171 | continue; | ||
| 172 | } | ||
| 173 | to_replace.push_back(MakeInst(env, block, inst)); | ||
| 174 | } | 171 | } |
| 172 | to_replace.push_back(MakeInst(env, block, inst)); | ||
| 175 | } | 173 | } |
| 176 | } | 174 | } |
| 177 | // Sort instructions to visit textures by constant buffer index, then by offset | 175 | // Sort instructions to visit textures by constant buffer index, then by offset |