summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/track.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-02-29 07:49:51 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-03-09 22:40:07 +0100
commit0528be5c92db67b608dc64322c55e57629c80619 (patch)
tree6705b628f5b7db52300f967f5101d172384eb101 /src/video_core/shader/track.cpp
parentvideo_core: Rename "const buffer locker" to "registry" (diff)
downloadyuzu-0528be5c92db67b608dc64322c55e57629c80619.tar
yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.gz
yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.bz2
yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.lz
yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.xz
yuzu-0528be5c92db67b608dc64322c55e57629c80619.tar.zst
yuzu-0528be5c92db67b608dc64322c55e57629c80619.zip
Diffstat (limited to 'src/video_core/shader/track.cpp')
-rw-r--r--src/video_core/shader/track.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp
index 831219841..10739b37d 100644
--- a/src/video_core/shader/track.cpp
+++ b/src/video_core/shader/track.cpp
@@ -81,14 +81,11 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackBindlessSampler(Node tracked, cons
MakeTrackSampler<BindlessSamplerNode>(cbuf->GetIndex(), immediate->GetValue());
return {tracked, track};
} else if (const auto operation = std::get_if<OperationNode>(&*offset)) {
- const auto bound_buffer = registry.ObtainBoundBuffer();
- if (!bound_buffer) {
+ const u32 bound_buffer = registry.GetBoundBuffer();
+ if (bound_buffer != cbuf->GetIndex()) {
return {};
}
- if (*bound_buffer != cbuf->GetIndex()) {
- return {};
- }
- auto pair = DecoupleIndirectRead(*operation);
+ const auto pair = DecoupleIndirectRead(*operation);
if (!pair) {
return {};
}