diff options
author | Lioncash <mathew1800@gmail.com> | 2020-04-15 21:59:23 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-04-16 03:33:46 +0200 |
commit | 1c340c6efad903580904297730d708ce8b947eb6 (patch) | |
tree | a79ad11775373ecf31912a7a50fcfbcc08d6e8b3 /src/video_core/shader/decode | |
parent | Merge pull request #3612 from ReinUsesLisp/red (diff) | |
download | yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.gz yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.bz2 yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.lz yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.xz yuzu-1c340c6efad903580904297730d708ce8b947eb6.tar.zst yuzu-1c340c6efad903580904297730d708ce8b947eb6.zip |
Diffstat (limited to 'src/video_core/shader/decode')
-rw-r--r-- | src/video_core/shader/decode/image.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp index 0dd7a1196..85ee9aa5e 100644 --- a/src/video_core/shader/decode/image.cpp +++ b/src/video_core/shader/decode/image.cpp @@ -352,8 +352,10 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { registry.ObtainBoundSampler(static_cast<u32>(instr.image.index.Value())); } else { const Node image_register = GetRegister(instr.gpr39); - const auto [base_image, buffer, offset] = TrackCbuf( - image_register, global_code, static_cast<s64>(global_code.size())); + const auto result = TrackCbuf(image_register, global_code, + static_cast<s64>(global_code.size())); + const auto buffer = std::get<1>(result); + const auto offset = std::get<2>(result); descriptor = registry.ObtainBindlessSampler(buffer, offset); } if (!descriptor) { @@ -497,9 +499,12 @@ Image& ShaderIR::GetImage(Tegra::Shader::Image image, Tegra::Shader::ImageType t Image& ShaderIR::GetBindlessImage(Tegra::Shader::Register reg, Tegra::Shader::ImageType type) { const Node image_register = GetRegister(reg); - const auto [base_image, buffer, offset] = + const auto result = TrackCbuf(image_register, global_code, static_cast<s64>(global_code.size())); + const auto buffer = std::get<1>(result); + const auto offset = std::get<2>(result); + const auto it = std::find_if(std::begin(used_images), std::end(used_images), [buffer = buffer, offset = offset](const Image& entry) { |