summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 97c55f2ec..c9f3a35e6 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -422,7 +422,7 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers(
}
current_framebuffer_config_state = fb_config_state;
- texture_cache.Guard(true);
+ texture_cache.GuardRenderTargets(true);
View depth_surface{};
if (using_depth_fb) {
@@ -500,7 +500,7 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers(
depth_surface->GetSurfaceParams().type == SurfaceType::DepthStencil;
}
- texture_cache.Guard(false);
+ texture_cache.GuardRenderTargets(false);
current_state.draw.draw_framebuffer = framebuffer_cache.GetFramebuffer(fbkey);
SyncViewport(current_state);
@@ -651,7 +651,9 @@ void RasterizerOpenGL::DrawArrays() {
SetupVertexBuffer(vao);
DrawParameters params = SetupDraw();
+ texture_cache.GuardSamplers(true);
SetupShaders(params.primitive_mode);
+ texture_cache.GuardSamplers(false);
ConfigureFramebuffers(state);
@@ -660,6 +662,10 @@ void RasterizerOpenGL::DrawArrays() {
shader_program_manager->ApplyTo(state);
state.Apply();
+ if (texture_cache.TextureBarrier()) {
+ glTextureBarrier();
+ }
+
params.DispatchDraw();
accelerate_draw = AccelDraw::Disabled;