diff options
author | Brian Paul <[email protected]> | 2006-04-27 02:46:20 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-04-27 02:46:20 +0000 |
commit | e814d5e89f10de0c20a5c35e317eeab89b47749b (patch) | |
tree | 659a3d1bd62bbd402262ecee7ffc2fb9894d4de3 | |
parent | edc16a5f7a89584490be0824a1d96e2f3426998b (diff) |
replace a bunch of casts with GET_XRB macro
-rw-r--r-- | src/mesa/drivers/x11/xm_span.c | 270 |
1 files changed, 136 insertions, 134 deletions
diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c index 72a3d45d2da..ff0557800ae 100644 --- a/src/mesa/drivers/x11/xm_span.c +++ b/src/mesa/drivers/x11/xm_span.c @@ -175,7 +175,8 @@ static unsigned long read_pixel( XMesaDisplay *dpy, const void *values, const GLubyte mask[] -/* NOTE: if mask==NULL, draw all pixels */ +#define GET_XRB(XRB) \ + struct xmesa_renderbuffer *XRB = xmesa_renderbuffer(rb) /* @@ -185,7 +186,7 @@ static void put_row_TRUECOLOR_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = XMESA_BUFFER(ctx->DrawBuffer)->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -222,7 +223,7 @@ static void put_row_rgb_TRUECOLOR_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -257,7 +258,7 @@ static void put_row_TRUEDITHER_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -292,7 +293,7 @@ static void put_row_rgb_TRUEDITHER_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -327,7 +328,7 @@ static void put_row_8A8B8G8R_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -361,7 +362,7 @@ static void put_row_rgb_8A8B8G8R_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -394,7 +395,7 @@ static void put_row_8A8R8G8B_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -428,7 +429,7 @@ static void put_row_rgb_8A8R8G8B_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -461,7 +462,7 @@ static void put_row_8R8G8B_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -494,7 +495,7 @@ static void put_row_8R8G8B24_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -590,7 +591,7 @@ static void put_row_rgb_8R8G8B_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -622,7 +623,7 @@ static void put_row_rgb_8R8G8B24_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -723,7 +724,7 @@ static void put_row_5R6G5B_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -756,7 +757,7 @@ static void put_row_DITHER_5R6G5B_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -791,7 +792,7 @@ static void put_row_rgb_5R6G5B_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -824,7 +825,7 @@ static void put_row_rgb_DITHER_5R6G5B_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -859,7 +860,7 @@ static void put_row_DITHER_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -892,7 +893,7 @@ static void put_row_rgb_DITHER_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -925,7 +926,7 @@ static void put_row_1BIT_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -960,7 +961,7 @@ static void put_row_rgb_1BIT_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -995,7 +996,7 @@ static void put_row_HPCR_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -1028,7 +1029,7 @@ static void put_row_rgb_HPCR_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -1060,7 +1061,7 @@ static void put_row_LOOKUP_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -1092,7 +1093,7 @@ static void put_row_rgb_LOOKUP_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -1124,7 +1125,7 @@ static void put_row_GRAYSCALE_pixmap( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -1155,7 +1156,7 @@ static void put_row_rgb_GRAYSCALE_pixmap( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -1185,7 +1186,7 @@ static void put_row_TRUECOLOR_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -1216,7 +1217,7 @@ static void put_row_rgb_TRUECOLOR_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -1247,7 +1248,7 @@ static void put_row_TRUEDITHER_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -1278,7 +1279,7 @@ static void put_row_rgb_TRUEDITHER_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -1308,9 +1309,10 @@ static void put_row_rgb_TRUEDITHER_ximage( RGB_SPAN_ARGS ) static void put_row_8A8B8G8R_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLuint *ptr = PIXEL_ADDR4(xrb, x, y); + (void) ctx; if (mask) { for (i=0;i<n;i++) { if (mask[i]) { @@ -1333,7 +1335,7 @@ static void put_row_8A8B8G8R_ximage( PUT_ROW_ARGS ) static void put_row_rgb_8A8B8G8R_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLuint *ptr = PIXEL_ADDR4(xrb, x, y); if (mask) { @@ -1357,7 +1359,7 @@ static void put_row_rgb_8A8B8G8R_ximage( RGB_SPAN_ARGS ) static void put_row_8A8R8G8B_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLuint *ptr = PIXEL_ADDR4(xrb, x, y); if (mask) { @@ -1382,7 +1384,7 @@ static void put_row_8A8R8G8B_ximage( PUT_ROW_ARGS ) static void put_row_rgb_8A8R8G8B_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLuint *ptr = PIXEL_ADDR4(xrb, x, y); if (mask) { @@ -1407,7 +1409,7 @@ static void put_row_rgb_8A8R8G8B_ximage( RGB_SPAN_ARGS ) static void put_row_8R8G8B_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLuint *ptr = PIXEL_ADDR4(xrb, x, y); if (mask) { @@ -1431,7 +1433,7 @@ static void put_row_8R8G8B_ximage( PUT_ROW_ARGS ) static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = (GLubyte *) PIXEL_ADDR3(xrb, x, y ); if (mask) { @@ -1582,7 +1584,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS ) static void put_row_rgb_8R8G8B_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLuint *ptr = PIXEL_ADDR4(xrb, x, y); if (mask) { @@ -1607,7 +1609,7 @@ static void put_row_rgb_8R8G8B_ximage( RGB_SPAN_ARGS ) static void put_row_rgb_8R8G8B24_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = (GLubyte *) PIXEL_ADDR3(xrb, x, y); if (mask) { @@ -1639,7 +1641,7 @@ static void put_row_rgb_8R8G8B24_ximage( RGB_SPAN_ARGS ) static void put_row_5R6G5B_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLushort *ptr = PIXEL_ADDR2(xrb, x, y); if (mask) { @@ -1679,7 +1681,7 @@ static void put_row_5R6G5B_ximage( PUT_ROW_ARGS ) static void put_row_DITHER_5R6G5B_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLuint i; register GLushort *ptr = PIXEL_ADDR2(xrb, x, y); @@ -1721,7 +1723,7 @@ static void put_row_DITHER_5R6G5B_ximage( PUT_ROW_ARGS ) static void put_row_rgb_5R6G5B_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLushort *ptr = PIXEL_ADDR2(xrb, x, y); if (mask) { @@ -1761,7 +1763,7 @@ static void put_row_rgb_5R6G5B_ximage( RGB_SPAN_ARGS ) static void put_row_rgb_DITHER_5R6G5B_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLuint i; register GLushort *ptr = PIXEL_ADDR2(xrb, x, y ); @@ -1802,7 +1804,7 @@ static void put_row_rgb_DITHER_5R6G5B_ximage( RGB_SPAN_ARGS ) static void put_row_DITHER_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; int yy = YFLIP(xrb, y); @@ -1829,7 +1831,7 @@ static void put_row_DITHER_ximage( PUT_ROW_ARGS ) static void put_row_rgb_DITHER_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; int yy = YFLIP(xrb, y); @@ -1857,7 +1859,7 @@ static void put_row_rgb_DITHER_ximage( RGB_SPAN_ARGS ) static void put_row_DITHER8_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); XDITHER_SETUP(y); @@ -1879,7 +1881,7 @@ static void put_row_DITHER8_ximage( PUT_ROW_ARGS ) static void put_row_rgb_DITHER8_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); XDITHER_SETUP(y); @@ -1908,7 +1910,7 @@ static void put_row_1BIT_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; SETUP_1BIT; @@ -1935,7 +1937,7 @@ static void put_row_rgb_1BIT_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; SETUP_1BIT; @@ -1961,7 +1963,7 @@ static void put_row_rgb_1BIT_ximage( RGB_SPAN_ARGS ) static void put_row_HPCR_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); @@ -1987,7 +1989,7 @@ static void put_row_HPCR_ximage( PUT_ROW_ARGS ) static void put_row_rgb_HPCR_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); @@ -2013,7 +2015,7 @@ static void put_row_rgb_HPCR_ximage( RGB_SPAN_ARGS ) static void put_row_LOOKUP_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; LOOKUP_SETUP; @@ -2040,7 +2042,7 @@ static void put_row_LOOKUP_ximage( PUT_ROW_ARGS ) static void put_row_rgb_LOOKUP_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; LOOKUP_SETUP; @@ -2067,7 +2069,7 @@ static void put_row_rgb_LOOKUP_ximage( RGB_SPAN_ARGS ) static void put_row_LOOKUP8_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); LOOKUP_SETUP; @@ -2090,7 +2092,7 @@ static void put_row_LOOKUP8_ximage( PUT_ROW_ARGS ) static void put_row_rgb_LOOKUP8_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); LOOKUP_SETUP; @@ -2118,7 +2120,7 @@ static void put_row_rgb_LOOKUP8_ximage( RGB_SPAN_ARGS ) static void put_row_GRAYSCALE_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -2144,7 +2146,7 @@ static void put_row_GRAYSCALE_ximage( PUT_ROW_ARGS ) static void put_row_rgb_GRAYSCALE_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -2170,7 +2172,7 @@ static void put_row_rgb_GRAYSCALE_ximage( RGB_SPAN_ARGS ) static void put_row_GRAYSCALE8_ximage( PUT_ROW_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); if (mask) { @@ -2195,7 +2197,7 @@ static void put_row_GRAYSCALE8_ximage( PUT_ROW_ARGS ) static void put_row_rgb_GRAYSCALE8_ximage( RGB_SPAN_ARGS ) { const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); if (mask) { @@ -2234,7 +2236,7 @@ static void put_values_TRUECOLOR_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2257,7 +2259,7 @@ static void put_values_TRUEDITHER_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2280,7 +2282,7 @@ static void put_values_8A8B8G8R_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2301,7 +2303,7 @@ static void put_values_8A8R8G8B_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2322,7 +2324,7 @@ static void put_values_8R8G8B_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2343,7 +2345,7 @@ static void put_values_8R8G8B24_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2364,7 +2366,7 @@ static void put_values_5R6G5B_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2385,7 +2387,7 @@ static void put_values_DITHER_5R6G5B_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2408,7 +2410,7 @@ static void put_values_DITHER_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2431,7 +2433,7 @@ static void put_values_1BIT_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2454,7 +2456,7 @@ static void put_values_HPCR_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2476,7 +2478,7 @@ static void put_values_LOOKUP_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2498,7 +2500,7 @@ static void put_values_GRAYSCALE_pixmap( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2519,7 +2521,7 @@ static void put_values_TRUECOLOR_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; for (i=0;i<n;i++) { @@ -2539,7 +2541,7 @@ static void put_values_TRUEDITHER_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; for (i=0;i<n;i++) { @@ -2558,7 +2560,7 @@ static void put_values_TRUEDITHER_ximage( PUT_VALUES_ARGS ) static void put_values_8A8B8G8R_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; for (i=0;i<n;i++) { if (mask[i]) { @@ -2574,7 +2576,7 @@ static void put_values_8A8B8G8R_ximage( PUT_VALUES_ARGS ) static void put_values_8A8R8G8B_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; for (i=0;i<n;i++) { if (mask[i]) { @@ -2591,7 +2593,7 @@ static void put_values_8A8R8G8B_ximage( PUT_VALUES_ARGS ) static void put_values_8R8G8B_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; for (i=0;i<n;i++) { if (mask[i]) { @@ -2608,7 +2610,7 @@ static void put_values_8R8G8B_ximage( PUT_VALUES_ARGS ) static void put_values_8R8G8B24_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; for (i=0;i<n;i++) { if (mask[i]) { @@ -2627,7 +2629,7 @@ static void put_values_8R8G8B24_ximage( PUT_VALUES_ARGS ) static void put_values_5R6G5B_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; for (i=0;i<n;i++) { if (mask[i]) { @@ -2644,7 +2646,7 @@ static void put_values_5R6G5B_ximage( PUT_VALUES_ARGS ) static void put_values_DITHER_5R6G5B_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLuint i; for (i=0;i<n;i++) { @@ -2662,7 +2664,7 @@ static void put_values_DITHER_5R6G5B_ximage( PUT_VALUES_ARGS ) static void put_values_DITHER_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; DITHER_SETUP; @@ -2681,7 +2683,7 @@ static void put_values_DITHER_ximage( PUT_VALUES_ARGS ) static void put_values_DITHER8_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; DITHER_SETUP; for (i=0;i<n;i++) { @@ -2700,7 +2702,7 @@ static void put_values_1BIT_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; SETUP_1BIT; @@ -2719,7 +2721,7 @@ static void put_values_1BIT_ximage( PUT_VALUES_ARGS ) static void put_values_HPCR_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLuint i; for (i=0;i<n;i++) { @@ -2737,7 +2739,7 @@ static void put_values_HPCR_ximage( PUT_VALUES_ARGS ) static void put_values_LOOKUP_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; LOOKUP_SETUP; @@ -2755,7 +2757,7 @@ static void put_values_LOOKUP_ximage( PUT_VALUES_ARGS ) static void put_values_LOOKUP8_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; LOOKUP_SETUP; for (i=0;i<n;i++) { @@ -2773,7 +2775,7 @@ static void put_values_LOOKUP8_ximage( PUT_VALUES_ARGS ) static void put_values_GRAYSCALE_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; for (i=0;i<n;i++) { @@ -2791,7 +2793,7 @@ static void put_values_GRAYSCALE_ximage( PUT_VALUES_ARGS ) static void put_values_GRAYSCALE8_ximage( PUT_VALUES_ARGS ) { const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; for (i=0;i<n;i++) { if (mask[i]) { @@ -2821,7 +2823,7 @@ static void put_values_GRAYSCALE8_ximage( PUT_VALUES_ARGS ) static void put_mono_row_pixmap( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; @@ -2862,7 +2864,7 @@ put_mono_row_ci_pixmap( PUT_MONO_ROW_ARGS ) { GLuint colorIndex = *((GLuint *) value); XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -2898,7 +2900,7 @@ put_mono_row_ci_pixmap( PUT_MONO_ROW_ARGS ) static void put_mono_row_TRUEDITHER_pixmap( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; @@ -2923,7 +2925,7 @@ static void put_mono_row_TRUEDITHER_pixmap( PUT_MONO_ROW_ARGS ) static void put_mono_row_DITHER_pixmap( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; @@ -2947,7 +2949,7 @@ static void put_mono_row_DITHER_pixmap( PUT_MONO_ROW_ARGS ) static void put_mono_row_1BIT_pixmap( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; @@ -2971,7 +2973,7 @@ static void put_mono_row_1BIT_pixmap( PUT_MONO_ROW_ARGS ) static void put_mono_row_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaImage *img = xrb->ximage; register GLuint i; @@ -2990,7 +2992,7 @@ static void put_mono_row_ci_ximage( PUT_MONO_ROW_ARGS ) { const GLuint colorIndex = *((GLuint *) value); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -3008,7 +3010,7 @@ put_mono_row_ci_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_TRUEDITHER_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaImage *img = xrb->ximage; const GLint r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; @@ -3030,7 +3032,7 @@ static void put_mono_row_TRUEDITHER_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_8A8B8G8R_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaContext xmesa = XMESA_CONTEXT(ctx); GLuint i, *ptr; const unsigned long pixel = xmesa_color_to_pixel(ctx, color[RCOMP], @@ -3049,7 +3051,7 @@ static void put_mono_row_8A8B8G8R_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_8A8R8G8B_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); GLuint i, *ptr; XMesaContext xmesa = XMESA_CONTEXT(ctx); const unsigned long pixel = xmesa_color_to_pixel(ctx, color[RCOMP], @@ -3069,7 +3071,7 @@ static void put_mono_row_8A8R8G8B_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_8R8G8B_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLuint pixel = PACK_8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP]); GLuint *ptr = PIXEL_ADDR4(xrb, x, y ); GLuint i; @@ -3087,7 +3089,7 @@ static void put_mono_row_8R8G8B_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_8R8G8B24_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP]; const GLubyte g = color[GCOMP]; const GLubyte b = color[BCOMP]; @@ -3109,7 +3111,7 @@ static void put_mono_row_8R8G8B24_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_DITHER_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; XMesaImage *img = xrb->ximage; int yy = YFLIP(xrb, y); @@ -3129,7 +3131,7 @@ static void put_mono_row_DITHER_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_DITHER8_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); register GLuint i; @@ -3148,7 +3150,7 @@ static void put_mono_row_DITHER8_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_LOOKUP8_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); GLubyte pixel; @@ -3169,7 +3171,7 @@ static void put_mono_row_1BIT_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; XMesaImage *img = xrb->ximage; register GLuint i; @@ -3189,7 +3191,7 @@ static void put_mono_row_1BIT_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_HPCR_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; register GLubyte *ptr = PIXEL_ADDR1(xrb, x, y); @@ -3208,7 +3210,7 @@ static void put_mono_row_HPCR_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_GRAYSCALE8_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte p = GRAY_RGB(color[RCOMP], color[GCOMP], color[BCOMP]); GLubyte *ptr = (GLubyte *) PIXEL_ADDR1(xrb, x, y); GLuint i; @@ -3227,7 +3229,7 @@ static void put_mono_row_GRAYSCALE8_ximage( PUT_MONO_ROW_ARGS ) static void put_mono_row_DITHER_5R6G5B_ximage( PUT_MONO_ROW_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); register GLushort *ptr = PIXEL_ADDR2(xrb, x, y ); const GLint r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; @@ -3260,7 +3262,7 @@ static void put_mono_values_pixmap( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3282,7 +3284,7 @@ put_mono_values_ci_pixmap( PUT_MONO_VALUES_ARGS ) { const GLuint colorIndex = *((GLuint *) value); const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3304,7 +3306,7 @@ static void put_mono_values_TRUEDITHER_pixmap( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3329,7 +3331,7 @@ static void put_mono_values_DITHER_pixmap( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3352,7 +3354,7 @@ static void put_mono_values_1BIT_pixmap( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3375,7 +3377,7 @@ static void put_mono_values_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; const unsigned long pixel = xmesa_color_to_pixel(ctx, color[RCOMP], @@ -3392,7 +3394,7 @@ static void put_mono_values_ci_ximage( PUT_MONO_VALUES_ARGS ) { const GLuint colorIndex = *((GLuint *) value); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; for (i=0;i<n;i++) { @@ -3410,7 +3412,7 @@ static void put_mono_values_TRUEDITHER_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; const int r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; @@ -3431,7 +3433,7 @@ static void put_mono_values_TRUEDITHER_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_8A8B8G8R_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLuint p = PACK_8A8B8G8R(color[RCOMP], color[GCOMP], color[BCOMP], color[ACOMP]); register GLuint i; @@ -3449,7 +3451,7 @@ static void put_mono_values_8A8B8G8R_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_8A8R8G8B_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLuint p = PACK_8A8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP], color[ACOMP]); register GLuint i; @@ -3467,7 +3469,7 @@ static void put_mono_values_8A8R8G8B_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_8R8G8B_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; const GLuint p = PACK_8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP]); for (i=0;i<n;i++) { @@ -3485,7 +3487,7 @@ static void put_mono_values_8R8G8B_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_8R8G8B24_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; register GLuint i; for (i=0;i<n;i++) { @@ -3505,7 +3507,7 @@ static void put_mono_values_8R8G8B24_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_DITHER_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; XMesaImage *img = xrb->ximage; register GLuint i; @@ -3524,7 +3526,7 @@ static void put_mono_values_DITHER_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_DITHER8_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; register GLuint i; DITHER_SETUP; @@ -3543,7 +3545,7 @@ static void put_mono_values_DITHER8_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_LOOKUP8_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; GLubyte pixel; LOOKUP_SETUP; @@ -3565,7 +3567,7 @@ static void put_mono_values_1BIT_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; XMesaImage *img = xrb->ximage; register GLuint i; @@ -3585,7 +3587,7 @@ static void put_mono_values_1BIT_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_HPCR_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; register GLuint i; @@ -3604,7 +3606,7 @@ static void put_mono_values_HPCR_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_GRAYSCALE8_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); register GLuint i; register GLubyte p = GRAY_RGB(color[RCOMP], color[GCOMP], color[BCOMP]); for (i=0;i<n;i++) { @@ -3622,7 +3624,7 @@ static void put_mono_values_GRAYSCALE8_ximage( PUT_MONO_VALUES_ARGS ) static void put_mono_values_DITHER_5R6G5B_ximage( PUT_MONO_VALUES_ARGS ) { const GLubyte *color = (const GLubyte *) value; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); const int r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; register GLuint i; @@ -3647,7 +3649,7 @@ static void put_row_ci_pixmap( PUT_ROW_ARGS ) { const GLuint *index = (GLuint *) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3676,7 +3678,7 @@ static void put_row_ci_pixmap( PUT_ROW_ARGS ) static void put_row_ci_ximage( PUT_ROW_ARGS ) { const GLuint *index = (const GLuint *) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; y = YFLIP(xrb, y); @@ -3706,7 +3708,7 @@ static void put_values_ci_pixmap( PUT_VALUES_ARGS ) { const GLuint *index = (const GLuint *) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaDrawable buffer = xrb->drawable; XMesaGC gc = XMESA_BUFFER(ctx->DrawBuffer)->gc; @@ -3726,7 +3728,7 @@ static void put_values_ci_pixmap( PUT_VALUES_ARGS ) static void put_values_ci_ximage( PUT_VALUES_ARGS ) { const GLuint *index = (const GLuint *) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaImage *img = xrb->ximage; register GLuint i; for (i=0;i<n;i++) { @@ -3798,7 +3800,7 @@ get_row_ci(GLcontext *ctx, struct gl_renderbuffer *rb, { GLuint *index = (GLuint *) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); GLuint i; y = YFLIP(xrb, y); @@ -3855,7 +3857,7 @@ get_row_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, { GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); XMesaBuffer source = XMESA_BUFFER(ctx->DrawBuffer); if (xrb->pixmap) { @@ -4257,7 +4259,7 @@ get_values_ci(GLcontext *ctx, struct gl_renderbuffer *rb, { GLuint *indx = (GLuint *) values; const XMesaContext xmesa = XMESA_CONTEXT(ctx); - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); GLuint i; if (xrb->pixmap) { for (i=0;i<n;i++) { @@ -4280,7 +4282,7 @@ get_values_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint n, const GLint x[], const GLint y[], void *values) { GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) rb; + GET_XRB(xrb); const XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; XMesaBuffer source = XMESA_BUFFER(ctx->DrawBuffer); |