1 /* -*- mode: C; tab-width:8; c-basic-offset:2 -*- */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the
30 * Thank you for your contribution, David!
32 * Please make note of the above copyright/license statement. If you
33 * contributed code or bug fixes to this code under the previous (GNU
34 * Library) license and object to the new license, your code will be
35 * removed at your request. Please see the Mesa docs/COPYRIGHT file
36 * for more information.
38 * Additional Mesa/3Dfx driver developers:
39 * Daryll Strauss <daryll@precisioninsight.com>
40 * Keith Whitwell <keith@precisioninsight.com>
42 * See fxapi.h for more revision/author details.
46 /* fxdd.c - 3Dfx VooDoo Mesa span and pixel functions */
59 #pragma warning( disable : 4090 4022 )
60 /* 4101 : "different 'const' qualifier"
61 * 4022 : "pointer mistmatch for actual parameter 'n'
67 #if !defined(FXMESA_USE_ARGB)
69 /* KW: Rearranged the args in the call to grLfbWriteRegion().
71 #define LFB_WRITE_SPAN_MESA(dst_buffer, \
77 writeRegionClipped(fxMesa, dst_buffer, \
80 GR_LFB_SRC_FMT_8888, \
87 #else /* defined(FXMESA_USE_RGBA) */
89 #define MESACOLOR_TO_ARGB(c) ( \
90 ( ((unsigned int)(c[ACOMP]))<<24 ) | \
91 ( ((unsigned int)(c[RCOMP]))<<16 ) | \
92 ( ((unsigned int)(c[GCOMP]))<<8 ) | \
93 ( (unsigned int)(c[BCOMP])) )
95 void LFB_WRITE_SPAN_MESA(GrBuffer_t dst_buffer
,
103 GLubyte (*rgba
)[4] = src_data
;
104 GLuint argb
[MAX_WIDTH
];
107 for (i
= 0; i
< src_width
; i
++)
109 argb
[i
] = MESACOLOR_TO_ARGB(rgba
[i
]);
111 writeRegionClipped(fxMesa
, dst_buffer
,
123 #if defined(FX_GLIDE3) && defined(XF86DRI)
125 static FxBool
writeRegionClipped(fxMesaContext fxMesa
, GrBuffer_t dst_buffer
,
126 FxU32 dst_x
, FxU32 dst_y
, GrLfbSrcFmt_t src_format
,
127 FxU32 src_width
, FxU32 src_height
, FxI32 src_stride
,
130 FxBool
writeRegionClipped(fxMesaContext fxMesa
, GrBuffer_t dst_buffer
,
131 FxU32 dst_x
, FxU32 dst_y
, GrLfbSrcFmt_t src_format
,
132 FxU32 src_width
, FxU32 src_height
, FxI32 src_stride
,
138 if (src_width
==1 && src_height
==1) { /* Easy case writing a point */
139 for (i
=0; i
<fxMesa
->numClipRects
; i
++) {
140 if ((dst_x
>=fxMesa
->pClipRects
[i
].x1
) &&
141 (dst_x
<fxMesa
->pClipRects
[i
].x2
) &&
142 (dst_y
>=fxMesa
->pClipRects
[i
].y1
) &&
143 (dst_y
<fxMesa
->pClipRects
[i
].y2
)) {
144 FX_grLfbWriteRegion(dst_buffer
, dst_x
, dst_y
, src_format
,
145 src_width
, src_height
, src_stride
, src_data
);
149 } else if (src_height
==1) { /* Writing a span */
150 for (i
=0; i
<fxMesa
->numClipRects
; i
++) {
151 if (dst_y
>=fxMesa
->pClipRects
[i
].y1
&& dst_y
<fxMesa
->pClipRects
[i
].y2
) {
152 if (dst_x
<fxMesa
->pClipRects
[i
].x1
) {
153 x
=fxMesa
->pClipRects
[i
].x1
;
154 data
=((char*)src_data
)+2*(dst_x
-x
);
155 w
=src_width
-(x
-dst_x
);
161 if (x
+w
>fxMesa
->pClipRects
[i
].x2
) {
162 w
=fxMesa
->pClipRects
[i
].x2
-x
;
164 FX_grLfbWriteRegion(dst_buffer
, x
, dst_y
, src_format
, w
, src_height
,
168 } else { /* Punt on the case of arbitrary rectangles */
176 #define writeRegionClipped(fxm,dst_buffer,dst_x,dst_y,src_format,src_width,src_height,src_stride,src_data) \
177 FX_grLfbWriteRegion(dst_buffer,dst_x,dst_y,src_format,src_width,src_height,src_stride,src_data)
181 /************************************************************************/
182 /***** Span functions *****/
183 /************************************************************************/
186 static void fxDDWriteRGBASpan(const GLcontext
*ctx
,
187 GLuint n
, GLint x
, GLint y
,
188 const GLubyte rgba
[][4], const GLubyte mask
[])
190 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
192 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
194 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
195 fprintf(stderr
,"fxmesa: fxDDWriteRGBASpan(...)\n");
207 LFB_WRITE_SPAN_MESA( fxMesa
->currentFB
, x
+i
-span
, bottom
-y
,
208 /* GR_LFB_SRC_FMT_8888,*/ span
, /*1,*/ 0, (void *) rgba
[i
-span
] );
215 LFB_WRITE_SPAN_MESA( fxMesa
->currentFB
, x
+n
-span
, bottom
-y
,
216 /* GR_LFB_SRC_FMT_8888, */ span
, /*1,*/ 0, (void *) rgba
[n
-span
] );
218 LFB_WRITE_SPAN_MESA( fxMesa
->currentFB
, x
, bottom
-y
,/* GR_LFB_SRC_FMT_8888,*/
219 n
,/* 1,*/ 0, (void *) rgba
);
223 static void fxDDWriteRGBSpan(const GLcontext
*ctx
,
224 GLuint n
, GLint x
, GLint y
,
225 const GLubyte rgb
[][3], const GLubyte mask
[])
227 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
229 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
230 GLubyte rgba
[MAX_WIDTH
][4];
232 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
233 fprintf(stderr
,"fxmesa: fxDDWriteRGBSpan()\n");
242 rgba
[span
][RCOMP
] = rgb
[i
][0];
243 rgba
[span
][GCOMP
] = rgb
[i
][1];
244 rgba
[span
][BCOMP
] = rgb
[i
][2];
245 rgba
[span
][ACOMP
] = 255;
249 LFB_WRITE_SPAN_MESA( fxMesa
->currentFB
, x
+i
-span
, bottom
-y
,
250 /*GR_LFB_SRC_FMT_8888,*/ span
,/* 1,*/ 0, (void *) rgba
);
257 LFB_WRITE_SPAN_MESA( fxMesa
->currentFB
, x
+n
-span
, bottom
-y
,
258 /*GR_LFB_SRC_FMT_8888,*/ span
,/* 1,*/ 0, (void *) rgba
);
261 rgba
[i
][RCOMP
]=rgb
[i
][0];
262 rgba
[i
][GCOMP
]=rgb
[i
][1];
263 rgba
[i
][BCOMP
]=rgb
[i
][2];
267 LFB_WRITE_SPAN_MESA( fxMesa
->currentFB
, x
, bottom
-y
,/* GR_LFB_SRC_FMT_8888,*/
268 n
,/* 1,*/ 0, (void *) rgba
);
273 static void fxDDWriteMonoRGBASpan(const GLcontext
*ctx
,
274 GLuint n
, GLint x
, GLint y
,
275 const GLubyte mask
[])
277 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
279 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
280 GLuint data
[MAX_WIDTH
];
282 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
283 fprintf(stderr
,"fxmesa: fxDDWriteMonoRGBASpan(...)\n");
292 data
[span
] = (GLuint
) fxMesa
->color
;
296 writeRegionClipped(fxMesa
, fxMesa
->currentFB
, x
+i
-span
, bottom
-y
,
297 GR_LFB_SRC_FMT_8888
, span
, 1, 0,
305 writeRegionClipped(fxMesa
, fxMesa
->currentFB
, x
+n
-span
, bottom
-y
,
306 GR_LFB_SRC_FMT_8888
, span
, 1, 0,
310 data
[i
]=(GLuint
) fxMesa
->color
;
313 writeRegionClipped(fxMesa
, fxMesa
->currentFB
, x
, bottom
-y
, GR_LFB_SRC_FMT_8888
,
314 n
, 1, 0, (void *) data
);
319 static void fxDDReadRGBASpan(const GLcontext
*ctx
,
320 GLuint n
, GLint x
, GLint y
, GLubyte rgba
[][4])
322 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
323 GLushort data
[MAX_WIDTH
];
325 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
327 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
328 fprintf(stderr
,"fxmesa: fxDDReadRGBASpan(...)\n");
331 assert(n
< MAX_WIDTH
);
334 FX_grLfbReadRegion( fxMesa
->currentFB
, x
, bottom
-y
, n
, 1, 0, data
);
337 GLushort pixel
= data
[i
];
338 rgba
[i
][RCOMP
] = FX_PixelToR
[pixel
];
339 rgba
[i
][GCOMP
] = FX_PixelToG
[pixel
];
340 rgba
[i
][BCOMP
] = FX_PixelToB
[pixel
];
341 rgba
[i
][ACOMP
] = 255;
345 /************************************************************************/
346 /***** Pixel functions *****/
347 /************************************************************************/
349 static void fxDDWriteRGBAPixels(const GLcontext
*ctx
,
350 GLuint n
, const GLint x
[], const GLint y
[],
351 CONST GLubyte rgba
[][4], const GLubyte mask
[])
353 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
355 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
357 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
358 fprintf(stderr
,"fxmesa: fxDDWriteRGBAPixels(...)\n");
363 LFB_WRITE_SPAN_MESA(fxMesa
->currentFB
, x
[i
]+fxMesa
->x_offset
, bottom
-y
[i
],
364 1, 1, (void *)rgba
[i
]);
367 static void fxDDWriteMonoRGBAPixels(const GLcontext
*ctx
,
368 GLuint n
, const GLint x
[], const GLint y
[],
369 const GLubyte mask
[])
371 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
373 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
375 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
376 fprintf(stderr
,"fxmesa: fxDDWriteMonoRGBAPixels(...)\n");
381 writeRegionClipped(fxMesa
, fxMesa
->currentFB
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],
382 GR_LFB_SRC_FMT_8888
,1,1,0,(void *) &fxMesa
->color
);
385 static void fxDDReadRGBAPixels(const GLcontext
*ctx
,
386 GLuint n
, const GLint x
[], const GLint y
[],
387 GLubyte rgba
[][4], const GLubyte mask
[])
389 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
391 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
393 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
394 fprintf(stderr
,"fxmesa: fxDDReadRGBAPixels(...)\n");
400 FX_grLfbReadRegion(fxMesa
->currentFB
,x
[i
],bottom
-y
[i
],1,1,0,&pixel
);
401 rgba
[i
][RCOMP
] = FX_PixelToR
[pixel
];
402 rgba
[i
][GCOMP
] = FX_PixelToG
[pixel
];
403 rgba
[i
][BCOMP
] = FX_PixelToB
[pixel
];
404 rgba
[i
][ACOMP
] = 255;
410 /************************************************************************/
411 /***** Depth functions *****/
412 /************************************************************************/
414 void fxDDReadDepthSpanFloat(GLcontext
*ctx
,
415 GLuint n
, GLint x
, GLint y
, GLfloat depth
[])
417 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
419 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
420 GLushort data
[MAX_WIDTH
];
422 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
423 fprintf(stderr
,"fxmesa: fxDDReadDepthSpanFloat(...)\n");
427 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
,bottom
-y
,n
,1,0,data
);
430 convert the read values to float values [0.0 .. 1.0].
433 depth
[i
]=data
[i
]/65535.0f
;
436 void fxDDReadDepthSpanInt(GLcontext
*ctx
,
437 GLuint n
, GLint x
, GLint y
, GLdepth depth
[])
439 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
440 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
442 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
443 fprintf(stderr
,"fxmesa: fxDDReadDepthSpanInt(...)\n");
447 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
,bottom
-y
,n
,1,0,depth
);
450 GLuint
fxDDDepthTestSpanGeneric(GLcontext
*ctx
,
451 GLuint n
, GLint x
, GLint y
, const GLdepth z
[],
454 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
455 GLushort depthdata
[MAX_WIDTH
];
456 GLdepth
*zptr
=depthdata
;
460 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
462 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
463 fprintf(stderr
,"fxmesa: fxDDDepthTestSpanGeneric(...)\n");
467 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
,bottom
-y
,n
,1,0,depthdata
);
469 /* switch cases ordered from most frequent to less frequent */
470 switch (ctx
->Depth
.Func
) {
472 if (ctx
->Depth
.Mask
) {
473 /* Update Z buffer */
474 for (i
=0; i
<n
; i
++,zptr
++,m
++) {
487 /* Don't update Z buffer */
488 for (i
=0; i
<n
; i
++,zptr
++,m
++) {
501 if (ctx
->Depth
.Mask
) {
502 /* Update Z buffer */
503 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
514 /* Don't update Z buffer */
515 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
528 if (ctx
->Depth
.Mask
) {
529 /* Update Z buffer */
530 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
541 /* Don't update Z buffer */
542 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
555 if (ctx
->Depth
.Mask
) {
556 /* Update Z buffer */
557 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
568 /* Don't update Z buffer */
569 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
582 if (ctx
->Depth
.Mask
) {
583 /* Update Z buffer */
584 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
595 /* Don't update Z buffer */
596 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
609 if (ctx
->Depth
.Mask
) {
610 /* Update Z buffer */
611 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
622 /* Don't update Z buffer */
623 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
636 if (ctx
->Depth
.Mask
) {
637 /* Update Z buffer */
638 for (i
=0;i
<n
;i
++,zptr
++,m
++) {
645 /* Don't update Z buffer or mask */
659 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
,bottom
-y
,GR_LFB_SRC_FMT_ZA16
,n
,1,0,depthdata
);
664 void fxDDDepthTestPixelsGeneric(GLcontext
* ctx
,
665 GLuint n
, const GLint x
[], const GLint y
[],
666 const GLdepth z
[], GLubyte mask
[])
668 fxMesaContext fxMesa
=(fxMesaContext
)ctx
->DriverCtx
;
671 GLint bottom
=fxMesa
->height
+fxMesa
->y_offset
-1;
673 if (MESA_VERBOSE
&VERBOSE_DRIVER
) {
674 fprintf(stderr
,"fxmesa: fxDDDepthTestPixelsGeneric(...)\n");
677 /* switch cases ordered from most frequent to less frequent */
678 switch (ctx
->Depth
.Func
) {
680 if (ctx
->Depth
.Mask
) {
681 /* Update Z buffer */
682 for (i
=0; i
<n
; i
++) {
684 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
687 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
695 /* Don't update Z buffer */
696 for (i
=0; i
<n
; i
++) {
698 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
711 if (ctx
->Depth
.Mask
) {
712 /* Update Z buffer */
713 for (i
=0; i
<n
; i
++) {
715 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
718 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
726 /* Don't update Z buffer */
727 for (i
=0; i
<n
; i
++) {
729 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
741 if (ctx
->Depth
.Mask
) {
742 /* Update Z buffer */
743 for (i
=0; i
<n
; i
++) {
745 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
748 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
756 /* Don't update Z buffer */
757 for (i
=0; i
<n
; i
++) {
759 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
771 if (ctx
->Depth
.Mask
) {
772 /* Update Z buffer */
773 for (i
=0; i
<n
; i
++) {
775 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
778 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
786 /* Don't update Z buffer */
787 for (i
=0; i
<n
; i
++) {
789 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
801 if (ctx
->Depth
.Mask
) {
802 /* Update Z buffer */
803 for (i
=0; i
<n
; i
++) {
805 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
808 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
816 /* Don't update Z buffer */
817 for (i
=0; i
<n
; i
++) {
819 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
832 if (ctx
->Depth
.Mask
) {
833 /* Update Z buffer */
834 for (i
=0; i
<n
; i
++) {
836 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
839 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
847 /* Don't update Z buffer */
848 for (i
=0; i
<n
; i
++) {
850 FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],1,1,0,&zval
);
862 if (ctx
->Depth
.Mask
) {
863 /* Update Z buffer */
864 for (i
=0; i
<n
; i
++) {
866 writeRegionClipped(fxMesa
, GR_BUFFER_AUXBUFFER
,x
[i
]+fxMesa
->x_offset
,bottom
-y
[i
],GR_LFB_SRC_FMT_ZA16
,1,1,0,(void*)&z
[i
]);
870 /* Don't update Z buffer or mask */
874 /* depth test never passes */
884 /************************************************************************/
887 void fxSetupDDSpanPointers(GLcontext
*ctx
)
889 ctx
->Driver
.WriteRGBASpan
=fxDDWriteRGBASpan
;
890 ctx
->Driver
.WriteRGBSpan
=fxDDWriteRGBSpan
;
891 ctx
->Driver
.WriteMonoRGBASpan
=fxDDWriteMonoRGBASpan
;
892 ctx
->Driver
.WriteRGBAPixels
=fxDDWriteRGBAPixels
;
893 ctx
->Driver
.WriteMonoRGBAPixels
=fxDDWriteMonoRGBAPixels
;
895 ctx
->Driver
.WriteCI8Span
=NULL
;
896 ctx
->Driver
.WriteCI32Span
=NULL
;
897 ctx
->Driver
.WriteMonoCISpan
=NULL
;
898 ctx
->Driver
.WriteCI32Pixels
=NULL
;
899 ctx
->Driver
.WriteMonoCIPixels
=NULL
;
901 ctx
->Driver
.ReadRGBASpan
=fxDDReadRGBASpan
;
902 ctx
->Driver
.ReadRGBAPixels
=fxDDReadRGBAPixels
;
904 ctx
->Driver
.ReadCI32Span
=NULL
;
905 ctx
->Driver
.ReadCI32Pixels
=NULL
;
913 * Need this to provide at least one external definition.
916 int gl_fx_dummy_function_span(void)