[Mesa-dev] [PATCH] egl: Fix pbuffer and pixmap gpu rendering

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Oct 7 05:50:18 PDT 2014


With pbuffers and pixmaps we were getting zero color buffers
available for drawing. This patch allow to do for example
glClear for pbuffers and pixmaps.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 src/mesa/main/buffers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 1ee2009..dfbe75c 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -100,7 +100,7 @@ draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer)
       case GL_FRONT:
          return BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT;
       case GL_BACK:
-         if (_mesa_is_gles(ctx)) {
+         if (_mesa_is_gles(ctx) || _mesa_is_winsys_fbo(ctx->DrawBuffer)) {
             /* Page 181 (page 192 of the PDF) in section 4.2.1 of the OpenGL
              * ES 3.0.1 specification says:
              *
-- 
1.8.5.1



More information about the mesa-dev mailing list