diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-15 19:22:57 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:38:34 +0200 |
commit | d7587842eb404a52eb75a12816028f0706821dd0 (patch) | |
tree | 30e522738e4fad03be4aef1436079e5902d49a74 /src/video_core/renderer_opengl | |
parent | texture_cache: Corrections to buffers and shadow formats use. (diff) | |
download | yuzu-d7587842eb404a52eb75a12816028f0706821dd0.tar yuzu-d7587842eb404a52eb75a12816028f0706821dd0.tar.gz yuzu-d7587842eb404a52eb75a12816028f0706821dd0.tar.bz2 yuzu-d7587842eb404a52eb75a12816028f0706821dd0.tar.lz yuzu-d7587842eb404a52eb75a12816028f0706821dd0.tar.xz yuzu-d7587842eb404a52eb75a12816028f0706821dd0.tar.zst yuzu-d7587842eb404a52eb75a12816028f0706821dd0.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 |
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; |