summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_framebuffer_cache.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-18 10:57:49 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:33 +0200
commit175aa343ff1c9f931b266caf2d19b8df943dab0d (patch)
treec9cdf1f449232c7fc0728be6bbc86d8537ff44aa /src/video_core/renderer_opengl/gl_framebuffer_cache.cpp
parentgl_shader_decompiler: Implement image binding settings (diff)
downloadyuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.gz
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.bz2
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.lz
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.xz
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.tar.zst
yuzu-175aa343ff1c9f931b266caf2d19b8df943dab0d.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_framebuffer_cache.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_framebuffer_cache.cpp8
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;