summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 05:07:57 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-07 02:23:39 +0100
commitcfb20c4c9d863698b938aaad3d27cfe8e4eedb2b (patch)
tree1ba7045068bc52438b1e40548597c4f4cec62120 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentsettings: Hide shader cache behind a setting (diff)
downloadyuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.gz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.bz2
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.lz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.xz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.zst
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 18aafe767..48e003fa1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1009,22 +1009,20 @@ void RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, const Shader& s
for (u32 bindpoint = 0; bindpoint < entries.size(); ++bindpoint) {
const auto& entry = entries[bindpoint];
+ const auto texture = maxwell3d.GetStageTexture(stage, entry.GetOffset());
const u32 current_bindpoint = base_bindings.sampler + bindpoint;
- auto& unit = state.texture_units[current_bindpoint];
-
- const auto texture = maxwell3d.GetStageTexture(entry.GetStage(), entry.GetOffset());
texture_samplers[current_bindpoint].SyncWithConfig(texture.tsc);
Surface surface = res_cache.GetTextureSurface(texture, entry);
if (surface != nullptr) {
- unit.texture =
+ state.texture_units[current_bindpoint].texture =
entry.IsArray() ? surface->TextureLayer().handle : surface->Texture().handle;
surface->UpdateSwizzle(texture.tic.x_source, texture.tic.y_source, texture.tic.z_source,
texture.tic.w_source);
} else {
// Can occur when texture addr is null or its memory is unmapped/invalid
- unit.texture = 0;
+ state.texture_units[current_bindpoint].texture = 0;
}
}
}