diff options
author | Liam <byteslice@airmail.cc> | 2023-01-21 01:30:45 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-01-23 18:03:19 +0100 |
commit | 76a4356e55d0725d288866a04743f1e991ec3e36 (patch) | |
tree | 47d51ec570aaa51eb4397e08152fc26c73497a8d /src/shader_recompiler/ir_opt/texture_pass.cpp | |
parent | Merge pull request #9555 from abouvier/catch2-update (diff) | |
download | yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.tar yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.tar.gz yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.tar.bz2 yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.tar.lz yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.tar.xz yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.tar.zst yuzu-76a4356e55d0725d288866a04743f1e991ec3e36.zip |
Diffstat (limited to 'src/shader_recompiler/ir_opt/texture_pass.cpp')
-rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index f5c86fcb1..9718c6921 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp @@ -524,6 +524,7 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo const auto& cbuf{texture_inst.cbuf}; auto flags{inst->Flags<IR::TextureInstInfo>()}; + bool is_multisample{false}; switch (inst->GetOpcode()) { case IR::Opcode::ImageQueryDimensions: flags.type.Assign(ReadTextureType(env, cbuf)); @@ -538,6 +539,12 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo } break; case IR::Opcode::ImageFetch: + if (flags.type == TextureType::Color2D || flags.type == TextureType::Color2DRect || + flags.type == TextureType::ColorArray2D) { + is_multisample = !inst->Arg(4).IsEmpty(); + } else { + inst->SetArg(4, IR::U32{}); + } if (flags.type != TextureType::Color1D) { break; } @@ -613,6 +620,7 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo index = descriptors.Add(TextureDescriptor{ .type = flags.type, .is_depth = flags.is_depth != 0, + .is_multisample = is_multisample, .has_secondary = cbuf.has_secondary, .cbuf_index = cbuf.index, .cbuf_offset = cbuf.offset, |