Mesa (master): st/glx: fix mixed declarations and code, remove unused var

Brian Paul brianp at kemper.freedesktop.org
Thu Oct 27 00:34:50 UTC 2011


Module: Mesa
Branch: master
Commit: 27de26073b0ab385e57504d77197a33bb7b6c28f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=27de26073b0ab385e57504d77197a33bb7b6c28f

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Oct 26 10:38:29 2011 -0600

st/glx: fix mixed declarations and code, remove unused var

---

 src/gallium/state_trackers/glx/xlib/xm_api.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index d80e7c8..75e9e11 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -1335,7 +1335,6 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
    struct st_framebuffer_iface* stfbi = drawable->stfb;
    struct pipe_resource *res;
    int x, y, w, h;
-   XMesaContext xmesa = XMesaGetCurrentContext();
    enum st_attachment_type st_attachment = xmesa_attachment_type(buffer);
 
    x = 0;
@@ -1354,6 +1353,7 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
       struct pipe_transfer *tex_xfer;
       char *map;
       int line, ximage_stride;
+      XImage *img;
 
       internal_format = choose_pixel_format(drawable->xm_visual);
 
@@ -1366,12 +1366,12 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
          return;
 
       /* Grab the XImage that we want to turn into a texture. */
-      XImage *img = XGetImage(dpy,
-                              drawable->ws.drawable,
-                              x, y,
-                              w, h,
-                              AllPlanes,
-                              ZPixmap);
+      img = XGetImage(dpy,
+                      drawable->ws.drawable,
+                      x, y,
+                      w, h,
+                      AllPlanes,
+                      ZPixmap);
 
       if (!img) {
          pipe_transfer_destroy(pipe, tex_xfer);




More information about the mesa-commit mailing list