diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_framebuffer_cache.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_framebuffer_cache.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_framebuffer_cache.cpp b/src/video_core/renderer_opengl/gl_framebuffer_cache.cpp index bb9f9b81f..7c926bd48 100644 --- a/src/video_core/renderer_opengl/gl_framebuffer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_framebuffer_cache.cpp @@ -37,7 +37,7 @@ OGLFramebuffer FramebufferCacheOpenGL::CreateFramebuffer(const FramebufferCacheK if (key.is_single_buffer) { if (key.color_attachments[0] != GL_NONE && key.colors[0]) { - key.colors[0]->Attach(key.color_attachments[0]); + key.colors[0]->Attach(key.color_attachments[0], GL_DRAW_FRAMEBUFFER); glDrawBuffer(key.color_attachments[0]); } else { glDrawBuffer(GL_NONE); @@ -45,14 +45,16 @@ OGLFramebuffer FramebufferCacheOpenGL::CreateFramebuffer(const FramebufferCacheK } else { for (std::size_t index = 0; index < Maxwell::NumRenderTargets; ++index) { if (key.colors[index]) { - key.colors[index]->Attach(GL_COLOR_ATTACHMENT0 + static_cast<GLenum>(index)); + key.colors[index]->Attach(GL_COLOR_ATTACHMENT0 + static_cast<GLenum>(index), + GL_DRAW_FRAMEBUFFER); } } glDrawBuffers(key.colors_count, key.color_attachments.data()); } if (key.zeta) { - key.zeta->Attach(key.stencil_enable ? GL_DEPTH_STENCIL_ATTACHMENT : GL_DEPTH_ATTACHMENT); + key.zeta->Attach(key.stencil_enable ? GL_DEPTH_STENCIL_ATTACHMENT : GL_DEPTH_ATTACHMENT, + GL_DRAW_FRAMEBUFFER); } return framebuffer; |