Henri Verbeet : wined3d: Remove restoring the read buffer from read_from_framebuffer_texture().

Alexandre Julliard julliard at winehq.org
Tue Jul 20 11:20:31 CDT 2010


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jul 19 18:36:22 2010 +0200

wined3d: Remove restoring the read buffer from read_from_framebuffer_texture().

The few functions that care about the read buffer should explicitly set it
themselves, instead of assuming any particular state.

---

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

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e21086f..94066ed 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1493,7 +1493,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
     IWineD3DDeviceImpl *device = This->resource.device;
     const struct wined3d_gl_info *gl_info;
     struct wined3d_context *context;
-    GLint prevRead;
 
     if (!surface_is_offscreen(This))
     {
@@ -1518,7 +1517,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
 
     ENTER_GL();
 
-    glGetIntegerv(GL_READ_BUFFER, &prevRead);
     glReadBuffer(device->offscreenBuffer);
     checkGLcall("glReadBuffer");
 
@@ -1526,9 +1524,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
             0, 0, 0, 0, This->currentDesc.Width, This->currentDesc.Height);
     checkGLcall("glCopyTexSubImage2D");
 
-    glReadBuffer(prevRead);
-    checkGLcall("glReadBuffer");
-
     LEAVE_GL();
 
     context_release(context);




More information about the wine-cvs mailing list