mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
st/glx: fix mixed declarations and code, remove unused var
This commit is contained in:
parent
2997b45896
commit
27de26073b
1 changed files with 7 additions and 7 deletions
|
|
@ -1335,7 +1335,6 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
|
||||||
struct st_framebuffer_iface* stfbi = drawable->stfb;
|
struct st_framebuffer_iface* stfbi = drawable->stfb;
|
||||||
struct pipe_resource *res;
|
struct pipe_resource *res;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
XMesaContext xmesa = XMesaGetCurrentContext();
|
|
||||||
enum st_attachment_type st_attachment = xmesa_attachment_type(buffer);
|
enum st_attachment_type st_attachment = xmesa_attachment_type(buffer);
|
||||||
|
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
@ -1354,6 +1353,7 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
|
||||||
struct pipe_transfer *tex_xfer;
|
struct pipe_transfer *tex_xfer;
|
||||||
char *map;
|
char *map;
|
||||||
int line, ximage_stride;
|
int line, ximage_stride;
|
||||||
|
XImage *img;
|
||||||
|
|
||||||
internal_format = choose_pixel_format(drawable->xm_visual);
|
internal_format = choose_pixel_format(drawable->xm_visual);
|
||||||
|
|
||||||
|
|
@ -1366,12 +1366,12 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Grab the XImage that we want to turn into a texture. */
|
/* Grab the XImage that we want to turn into a texture. */
|
||||||
XImage *img = XGetImage(dpy,
|
img = XGetImage(dpy,
|
||||||
drawable->ws.drawable,
|
drawable->ws.drawable,
|
||||||
x, y,
|
x, y,
|
||||||
w, h,
|
w, h,
|
||||||
AllPlanes,
|
AllPlanes,
|
||||||
ZPixmap);
|
ZPixmap);
|
||||||
|
|
||||||
if (!img) {
|
if (!img) {
|
||||||
pipe_transfer_destroy(pipe, tex_xfer);
|
pipe_transfer_destroy(pipe, tex_xfer);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue