diff options
author | Feng Chen <VonChenPlus@gmail.com> | 2022-09-20 11:56:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 11:56:43 +0800 |
commit | c864cb57726e76e9dc4558036f3212168bec825d (patch) | |
tree | ca79c4397f40990488a7b5691e15c0fcfec507b6 /src/shader_recompiler | |
parent | 9a95c7fa14bdfc14aacea92896c8ae8533918fe8 (diff) | |
parent | 8d4458ef24e473e57b9931d7a9d1442b51fb0b1a (diff) |
Merge branch 'master' into mipmap
Diffstat (limited to 'src/shader_recompiler')
-rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index 5cead5135e..597112ba47 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp @@ -415,11 +415,11 @@ void TexturePass(Environment& env, IR::Program& program) { inst->SetFlags(flags); break; case IR::Opcode::ImageSampleImplicitLod: - if (flags.type == TextureType::Color2D) { - auto texture_type = ReadTextureType(env, cbuf); - if (texture_type == TextureType::Color2DRect) { - PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst); - } + if (flags.type != TextureType::Color2D) { + break; + } + if (ReadTextureType(env, cbuf) == TextureType::Color2DRect) { + PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst); } break; case IR::Opcode::ImageFetch: |