summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/texture_pass.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-03-14 03:41:05 -0300
committerGravatar ameerj2021-07-22 21:51:23 -0400
commit71f96fa6366dc6dd306a953bca1b958fb32bc55a (patch)
tree12e13f9502e4b9510446c967a831e5d4bacb729e /src/shader_recompiler/ir_opt/texture_pass.cpp
parentspirv: Add SignedZeroInfNanPreserve logic (diff)
downloadyuzu-71f96fa6366dc6dd306a953bca1b958fb32bc55a.tar.gz
yuzu-71f96fa6366dc6dd306a953bca1b958fb32bc55a.tar.xz
yuzu-71f96fa6366dc6dd306a953bca1b958fb32bc55a.zip
shader: Implement CAL inlining function calls
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
-rw-r--r--src/shader_recompiler/ir_opt/texture_pass.cpp12
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
165void TexturePass(Environment& env, IR::Program& program) { 165void 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