Henri Verbeet : wined3d: Set the read buffer to GL_NONE for draws and clears on an FBO.

Alexandre Julliard julliard at winehq.org
Mon Apr 11 13:29:27 CDT 2011


Module: wine
Branch: master
Commit: 8e12b2e61e8c6441ed25c116142c262efdf88b20
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8e12b2e61e8c6441ed25c116142c262efdf88b20

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Apr  8 20:22:51 2011 +0200

wined3d: Set the read buffer to GL_NONE for draws and clears on an FBO.

For the benefit of depth-only draws and clears, that would otherwise fail FBO
completeness, unless the driver supports ARB_ES2_compatibility.

---

 dlls/wined3d/context.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index d1a3189..c2bdd3c 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2105,6 +2105,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
                 ++i;
             }
             context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE);
+            glReadBuffer(GL_NONE);
+            checkGLcall("glReadBuffer");
         }
         else
         {
@@ -2172,6 +2174,8 @@ BOOL context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
             ENTER_GL();
             context_apply_fbo_state(context, GL_FRAMEBUFFER, device->render_targets,
                     device->depth_stencil, SFLAG_INTEXTURE);
+            glReadBuffer(GL_NONE);
+            checkGLcall("glReadBuffer");
             LEAVE_GL();
         }
     }




More information about the wine-cvs mailing list