diff options
author | Lioncash <mathew1800@gmail.com> | 2020-04-17 04:30:23 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-04-17 04:45:41 +0200 |
commit | d159643fd780cc8a467822ebd008bb48c2deab7a (patch) | |
tree | f784adcf5ff498f08297a349fc1bd2540c46a9b6 /src/video_core/shader | |
parent | decode/texture: Collapse loop down into std::generate (diff) | |
download | yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.tar yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.tar.gz yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.tar.bz2 yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.tar.lz yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.tar.xz yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.tar.zst yuzu-d159643fd780cc8a467822ebd008bb48c2deab7a.zip |
Diffstat (limited to 'src/video_core/shader')
-rw-r--r-- | src/video_core/shader/decode/texture.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp index 0b9817093..e68f1d305 100644 --- a/src/video_core/shader/decode/texture.cpp +++ b/src/video_core/shader/decode/texture.cpp @@ -268,7 +268,6 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) { "NDV is not implemented"); auto texture_type = instr.tmml.texture_type.Value(); - const bool is_array = instr.tmml.array != 0; Node index_var{}; const Sampler* sampler = is_bindless ? GetBindlessSampler(instr.gpr20, index_var) : GetSampler(instr.sampler); @@ -592,8 +591,9 @@ Node4 ShaderIR::GetTexCode(Instruction instr, TextureType texture_type, ++parameter_register; } - const auto [coord_count, total_coord_count] = ValidateAndGetCoordinateElement( - texture_type, depth_compare, is_array, lod_bias_enabled, 4, 5); + const auto coord_counts = ValidateAndGetCoordinateElement(texture_type, depth_compare, is_array, + lod_bias_enabled, 4, 5); + const auto coord_count = std::get<0>(coord_counts); // If enabled arrays index is always stored in the gpr8 field const u64 array_register = instr.gpr8.Value(); // First coordinate index is the gpr8 or gpr8 + 1 when arrays are used @@ -631,8 +631,10 @@ Node4 ShaderIR::GetTexsCode(Instruction instr, TextureType texture_type, const bool lod_bias_enabled = (process_mode != TextureProcessMode::None && process_mode != TextureProcessMode::LZ); - const auto [coord_count, total_coord_count] = ValidateAndGetCoordinateElement( - texture_type, depth_compare, is_array, lod_bias_enabled, 4, 4); + const auto coord_counts = ValidateAndGetCoordinateElement(texture_type, depth_compare, is_array, + lod_bias_enabled, 4, 4); + const auto coord_count = std::get<0>(coord_counts); + // If enabled arrays index is always stored in the gpr8 field const u64 array_register = instr.gpr8.Value(); // First coordinate index is stored in gpr8 field or (gpr8 + 1) when arrays are used |