summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKendall Bennett <[email protected]>2003-10-08 01:53:30 +0000
committerKendall Bennett <[email protected]>2003-10-08 01:53:30 +0000
commit2cdd699a77f7801b1e37b72108a33fa95354e67a (patch)
tree09e9862652847f7eeeb6258620fb2012c8e6e90c /src/mesa/drivers
parent4e5b58f48382862922dbc387080bfb2378a43b47 (diff)
More SciTech SNAP specific changes to glheader.h. Also modified the macros
in swrast/s_spantemp.h to allow dithering to be used in the SNAP drivers.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/fb/fb_dri.c18
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c28
2 files changed, 23 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c
index 945a78f2d0f..794e3d1fc8c 100644
--- a/src/mesa/drivers/dri/fb/fb_dri.c
+++ b/src/mesa/drivers/dri/fb/fb_dri.c
@@ -1,4 +1,4 @@
-/* $Id: fb_dri.c,v 1.1 2003/08/06 18:11:57 keithw Exp $ */
+/* $Id: fb_dri.c,v 1.2 2003/10/08 01:53:30 kendallb Exp $ */
/*
* Mesa 3-D graphics library
@@ -212,9 +212,9 @@ init_core_functions( GLcontext *ctx )
#define INIT_PIXEL_PTR(P, X, Y) \
GLubyte *P = (char *)dPriv->currentBuffer + (Y) * dPriv->currentPitch + (X) * 3
#define INC_PIXEL_PTR(P) P += 3
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[0] = B; P[1] = G; P[2] = R
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[0] = B; P[1] = G; P[2] = R
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = P[2]; G = P[1]; B = P[0]; A = CHAN_MAX
@@ -230,9 +230,9 @@ init_core_functions( GLcontext *ctx )
#define INIT_PIXEL_PTR(P, X, Y) \
GLubyte *P = (char *)dPriv->currentBuffer + (Y) * dPriv->currentPitch + (X) * 4;
#define INC_PIXEL_PTR(P) P += 4
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[0] = B; P[1] = G; P[2] = R; P[3] = 255
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[0] = B; P[1] = G; P[2] = R; P[3] = A
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = P[2]; G = P[1]; B = P[0]; A = P[3]
@@ -248,9 +248,9 @@ init_core_functions( GLcontext *ctx )
#define INIT_PIXEL_PTR(P, X, Y) \
GLushort *P = (GLushort *) ((char *)dPriv->currentBuffer + (Y) * dPriv->currentPitch + (X) * 2)
#define INC_PIXEL_PTR(P) P += 1
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
*P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
*P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = ( (((*P) >> 8) & 0xf8) | (((*P) >> 11) & 0x7) ); \
@@ -269,9 +269,9 @@ init_core_functions( GLcontext *ctx )
#define INIT_PIXEL_PTR(P, X, Y) \
GLushort *P = (GLushort *) ((char *)dPriv->currentBuffer + (Y) * dPriv->currentPitch + (X) * 2)
#define INC_PIXEL_PTR(P) P += 1
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
*P = ( (((R) & 0xf8) << 7) | (((G) & 0xf8) << 2) | ((B) >> 3) )
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
*P = ( (((R) & 0xf8) << 7) | (((G) & 0xf8) << 2) | ((B) >> 3) )
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = ( (((*P) >> 7) & 0xf8) | (((*P) >> 10) & 0x7) ); \
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 396f9af6b05..4fd58f20273 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -226,20 +226,20 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
GLchan *P = osmesa->rowaddr[Y] + 4 * (X)
#define INC_PIXEL_PTR(P) P += 4
#if CHAN_TYPE == GL_FLOAT
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[0] = MAX2((R), 0.0F); \
P[1] = MAX2((G), 0.0F); \
P[2] = MAX2((B), 0.0F); \
P[3] = CHAN_MAXF
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[0] = MAX2((R), 0.0F); \
P[1] = MAX2((G), 0.0F); \
P[2] = MAX2((B), 0.0F); \
P[3] = CLAMP((A), 0.0F, CHAN_MAXF)
#else
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[0] = R; P[1] = G; P[2] = B; P[3] = CHAN_MAX
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[0] = R; P[1] = G; P[2] = B; P[3] = A
#endif
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
@@ -253,9 +253,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
#define INIT_PIXEL_PTR(P, X, Y) \
GLchan *P = osmesa->rowaddr[Y] + 4 * (X)
#define INC_PIXEL_PTR(P) P += 4
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[2] = R; P[1] = G; P[0] = B; P[3] = CHAN_MAX
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[2] = R; P[1] = G; P[0] = B; P[3] = A
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = P[2]; G = P[1]; B = P[0]; A = P[3]
@@ -268,9 +268,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
#define INIT_PIXEL_PTR(P, X, Y) \
GLchan *P = osmesa->rowaddr[Y] + 4 * (X)
#define INC_PIXEL_PTR(P) P += 4
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[1] = R; P[2] = G; P[3] = B; P[0] = CHAN_MAX
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[1] = R; P[2] = G; P[3] = B; P[0] = A
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = P[1]; G = P[2]; B = P[3]; A = P[0]
@@ -283,9 +283,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
#define INIT_PIXEL_PTR(P, X, Y) \
GLchan *P = osmesa->rowaddr[Y] + 4 * (X)
#define INC_PIXEL_PTR(P) P += 4
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[0] = R; P[1] = G; P[2] = B
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[0] = R; P[1] = G; P[2] = B
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = P[0]; G = P[1]; B = P[2]; A = CHAN_MAX
@@ -298,9 +298,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
#define INIT_PIXEL_PTR(P, X, Y) \
GLchan *P = osmesa->rowaddr[Y] + 4 * (X)
#define INC_PIXEL_PTR(P) P += 4
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
P[0] = B; P[1] = G; P[2] = R
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
P[0] = B; P[1] = G; P[2] = R
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
B = P[0]; G = P[1]; R = P[2]; A = CHAN_MAX
@@ -314,9 +314,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
#define INIT_PIXEL_PTR(P, X, Y) \
GLushort *P = (GLushort *) osmesa->rowaddr[Y] + (X)
#define INC_PIXEL_PTR(P) P += 1
-#define STORE_RGB_PIXEL(P, R, G, B) \
+#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
*P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
-#define STORE_RGBA_PIXEL(P, R, G, B, A) \
+#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
*P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
R = ( (((*P) >> 8) & 0xf8) | (((*P) >> 11) & 0x7) ); \