summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-04 14:16:14 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-04 15:14:27 +0100
commit2600633b895ad06efb316ed0e3205f8adcaa96da (patch)
tree3123aaeb3fea7342d2bac839aa99e066224c6154
parentOpenGL: Fix DisplayTransfer accel when input width != output width (diff)
downloadyuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.tar
yuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.tar.gz
yuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.tar.bz2
yuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.tar.lz
yuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.tar.xz
yuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.tar.zst
yuzu-2600633b895ad06efb316ed0e3205f8adcaa96da.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 5cbad9b43..9ee3bb2ac 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -158,24 +158,21 @@ bool RasterizerCacheOpenGL::BlitTextures(GLuint src_tex, GLuint dst_tex,
buffers = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
}
- if (OpenGLState::CheckFBStatus(GL_READ_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
- return false;
- }
+ bool can_blit = OpenGLState::CheckFBStatus(GL_READ_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE &&
+ OpenGLState::CheckFBStatus(GL_DRAW_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE;
- if (OpenGLState::CheckFBStatus(GL_DRAW_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
- return false;
+ if (can_blit) {
+ glBlitFramebuffer(src_rect.left, src_rect.top, src_rect.right, src_rect.bottom,
+ dst_rect.left, dst_rect.top, dst_rect.right, dst_rect.bottom, buffers,
+ buffers == GL_COLOR_BUFFER_BIT ? GL_LINEAR : GL_NEAREST);
}
- glBlitFramebuffer(src_rect.left, src_rect.top, src_rect.right, src_rect.bottom, dst_rect.left,
- dst_rect.top, dst_rect.right, dst_rect.bottom, buffers,
- buffers == GL_COLOR_BUFFER_BIT ? GL_LINEAR : GL_NEAREST);
-
// Restore previous framebuffer bindings
cur_state.draw.read_framebuffer = old_fbs[0];
cur_state.draw.draw_framebuffer = old_fbs[1];
cur_state.Apply();
- return true;
+ return can_blit;
}
bool RasterizerCacheOpenGL::TryBlitSurfaces(CachedSurface* src_surface,