2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 /* fxdd.c - 3Dfx VooDoo Mesa span and pixel functions */
46 #include "swrast/swrast.h"
49 /************************************************************************/
50 /***** Span functions *****/
51 /************************************************************************/
57 GrBuffer_t currentFB = GR_BUFFER_BACKBUFFER; \
58 GLuint pitch = info.strideInBytes; \
59 GLuint height = fxMesa->height; \
60 char *buf = (char *)((char *)info.lfbPtr + 0 /* x, y offset */); \
64 #define CLIPPIXEL( _x, _y ) ( _x >= minx && _x < maxx && \
65 _y >= miny && _y < maxy )
67 #define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \
68 if ( _y < miny || _y >= maxy ) { \
73 if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx;\
74 if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \
77 #define Y_FLIP(_y) (height - _y - 1)
79 #define HW_WRITE_LOCK() \
80 fxMesaContext fxMesa = FX_CONTEXT(ctx); \
82 info.size = sizeof(GrLfbInfo_t); \
83 if ( grLfbLock( GR_LFB_WRITE_ONLY, \
84 currentFB, LFB_MODE, \
85 GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) {
87 #define HW_WRITE_UNLOCK() \
88 grLfbUnlock( GR_LFB_WRITE_ONLY, currentFB ); \
91 #define HW_READ_LOCK() \
92 fxMesaContext fxMesa = FX_CONTEXT(ctx); \
94 info.size = sizeof(GrLfbInfo_t); \
95 if ( grLfbLock( GR_LFB_READ_ONLY, currentFB, \
96 LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) {
98 #define HW_READ_UNLOCK() \
99 grLfbUnlock( GR_LFB_READ_ONLY, currentFB ); \
102 #define HW_WRITE_CLIPLOOP() \
104 /* remember, we need to flip the scissor, too */ \
105 /* is it better to do it inside fxDDScissor? */ \
106 const int minx = fxMesa->clipMinX; \
107 const int maxy = Y_FLIP(fxMesa->clipMinY); \
108 const int maxx = fxMesa->clipMaxX; \
109 const int miny = Y_FLIP(fxMesa->clipMaxY);
111 #define HW_READ_CLIPLOOP() \
113 /* remember, we need to flip the scissor, too */ \
114 /* is it better to do it inside fxDDScissor? */ \
115 const int minx = fxMesa->clipMinX; \
116 const int maxy = Y_FLIP(fxMesa->clipMinY); \
117 const int maxx = fxMesa->clipMaxX; \
118 const int miny = Y_FLIP(fxMesa->clipMaxY);
120 #define HW_ENDCLIPLOOP() \
124 /* 16 bit, ARGB1555 color spanline and pixel functions */
127 #define LFB_MODE GR_LFBWRITEMODE_1555
130 #define BYTESPERPIXEL 2
132 #undef INIT_MONO_PIXEL
133 #define INIT_MONO_PIXEL(p, color) \
134 p = TDFXPACKCOLOR1555( color[RCOMP], color[GCOMP], color[BCOMP], color[ACOMP] )
136 #define WRITE_RGBA( _x, _y, r, g, b, a ) \
137 *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch) = \
138 TDFXPACKCOLOR1555( r, g, b, a )
140 #define WRITE_PIXEL( _x, _y, p ) \
141 *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch) = p
143 #define READ_RGBA( rgba, _x, _y ) \
145 GLushort p = *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch); \
146 rgba[0] = FX_rgb_scale_5[(p >> 10) & 0x1F]; \
147 rgba[1] = FX_rgb_scale_5[(p >> 5) & 0x1F]; \
148 rgba[2] = FX_rgb_scale_5[ p & 0x1F]; \
149 rgba[3] = (p & 0x8000) ? 255 : 0; \
152 #define TAG(x) tdfx##x##_ARGB1555
153 #include "../dri/common/spantmp.h"
156 /* 16 bit, RGB565 color spanline and pixel functions */
157 /* [dBorca] Hack alert:
158 * This is wrong. The alpha value is lost, even when we provide
159 * HW alpha (565 w/o depth buffering). To really update alpha buffer,
160 * we would need to do the 565 writings via 8888 colorformat and rely
161 * on the Voodoo to perform color scaling. In which case our 565 span
162 * would look nicer! But this violates FSAA rules...
166 #define LFB_MODE GR_LFBWRITEMODE_565
169 #define BYTESPERPIXEL 2
171 #undef INIT_MONO_PIXEL
172 #define INIT_MONO_PIXEL(p, color) \
173 p = TDFXPACKCOLOR565( color[RCOMP], color[GCOMP], color[BCOMP] )
175 #define WRITE_RGBA( _x, _y, r, g, b, a ) \
176 *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch) = \
177 TDFXPACKCOLOR565( r, g, b )
179 #define WRITE_PIXEL( _x, _y, p ) \
180 *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch) = p
182 #define READ_RGBA( rgba, _x, _y ) \
184 GLushort p = *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch); \
185 rgba[0] = FX_rgb_scale_5[(p >> 11) & 0x1F]; \
186 rgba[1] = FX_rgb_scale_6[(p >> 5) & 0x3F]; \
187 rgba[2] = FX_rgb_scale_5[ p & 0x1F]; \
191 #define TAG(x) tdfx##x##_RGB565
192 #include "../dri/common/spantmp.h"
195 /* 32 bit, ARGB8888 color spanline and pixel functions */
198 #define LFB_MODE GR_LFBWRITEMODE_8888
201 #define BYTESPERPIXEL 4
203 #undef INIT_MONO_PIXEL
204 #define INIT_MONO_PIXEL(p, color) \
205 p = TDFXPACKCOLOR8888( color[RCOMP], color[GCOMP], color[BCOMP], color[ACOMP] )
207 #define WRITE_RGBA( _x, _y, r, g, b, a ) \
208 *(GLuint *)(buf + _x*BYTESPERPIXEL + _y*pitch) = \
209 TDFXPACKCOLOR8888( r, g, b, a )
211 #define WRITE_PIXEL( _x, _y, p ) \
212 *(GLuint *)(buf + _x*BYTESPERPIXEL + _y*pitch) = p
214 #define READ_RGBA( rgba, _x, _y ) \
216 GLuint p = *(GLuint *)(buf + _x*BYTESPERPIXEL + _y*pitch); \
217 rgba[0] = (p >> 16) & 0xff; \
218 rgba[1] = (p >> 8) & 0xff; \
219 rgba[2] = (p >> 0) & 0xff; \
220 rgba[3] = (p >> 24) & 0xff; \
223 #define TAG(x) tdfx##x##_ARGB8888
224 #include "../dri/common/spantmp.h"
227 /************************************************************************/
228 /***** Depth functions *****/
229 /************************************************************************/
234 #undef HW_WRITE_UNLOCK
236 #undef HW_READ_UNLOCK
238 #define HW_CLIPLOOP HW_WRITE_CLIPLOOP
240 #define LOCAL_DEPTH_VARS \
241 GLuint pitch = info.strideInBytes; \
242 GLuint height = fxMesa->height; \
243 char *buf = (char *)((char *)info.lfbPtr + 0 /* x, y offset */); \
246 #define HW_WRITE_LOCK() \
247 fxMesaContext fxMesa = FX_CONTEXT(ctx); \
249 info.size = sizeof(GrLfbInfo_t); \
250 if ( grLfbLock( GR_LFB_WRITE_ONLY, \
251 GR_BUFFER_AUXBUFFER, LFB_MODE, \
252 GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) {
254 #define HW_WRITE_UNLOCK() \
255 grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_AUXBUFFER); \
258 #define HW_READ_LOCK() \
259 fxMesaContext fxMesa = FX_CONTEXT(ctx); \
261 info.size = sizeof(GrLfbInfo_t); \
262 if ( grLfbLock( GR_LFB_READ_ONLY, GR_BUFFER_AUXBUFFER, \
263 LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) {
265 #define HW_READ_UNLOCK() \
266 grLfbUnlock( GR_LFB_READ_ONLY, GR_BUFFER_AUXBUFFER); \
270 /* 16 bit, depth spanline and pixel functions */
273 #define LFB_MODE GR_LFBWRITEMODE_ZA16
276 #define BYTESPERPIXEL 2
278 #define VALUE_TYPE GLushort
280 #define WRITE_DEPTH( _x, _y, d ) \
281 *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch) = d
283 #define READ_DEPTH( d, _x, _y ) \
284 d = *(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch)
286 #define TAG(x) tdfx##x##_Z16
287 #include "../dri/common/depthtmp.h"
290 /* 24 bit, depth spanline and pixel functions (for use w/ stencil) */
291 /* [dBorca] Hack alert:
292 * This is evil. The incoming Mesa's 24bit depth value
293 * is shifted left 8 bits, to obtain a full 32bit value,
294 * which will be thrown into the framebuffer. We rely on
295 * the fact that Voodoo hardware transforms a 32bit value
296 * into 24bit value automatically and, MOST IMPORTANT, won't
297 * alter the upper 8bits of the value already existing in the
298 * framebuffer (where stencil resides).
302 #define LFB_MODE GR_LFBWRITEMODE_Z32
305 #define BYTESPERPIXEL 4
307 #define VALUE_TYPE GLuint
309 #define WRITE_DEPTH( _x, _y, d ) \
310 *(GLuint *)(buf + _x*BYTESPERPIXEL + _y*pitch) = d << 8
312 #define READ_DEPTH( d, _x, _y ) \
313 d = (*(GLuint *)(buf + _x*BYTESPERPIXEL + _y*pitch)) & 0xffffff
315 #define TAG(x) tdfx##x##_Z24
316 #include "../dri/common/depthtmp.h"
319 /* 32 bit, depth spanline and pixel functions (for use w/o stencil) */
320 /* [dBorca] Hack alert:
321 * This is more evil. We make Mesa run in 32bit depth, but
322 * tha Voodoo HW can only handle 24bit depth. Well, exploiting
323 * the pixel pipeline, we can achieve 24:8 format for greater
325 * If anyone tells me how to really store 32bit values into the
326 * depth buffer, I'll write the *_Z32 routines. Howver, bear in
327 * mind that means running without stencil!
330 /************************************************************************/
331 /***** Span functions (optimized) *****/
332 /************************************************************************/
335 * Read a span of 15-bit RGB pixels. Note, we don't worry about cliprects
336 * since OpenGL says obscured pixels have undefined values.
338 static void fxReadRGBASpan_ARGB1555 (const GLcontext
* ctx
,
339 struct gl_renderbuffer
*rb
,
344 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
345 GrBuffer_t currentFB
= GR_BUFFER_BACKBUFFER
;
347 info
.size
= sizeof(GrLfbInfo_t
);
348 if (grLfbLock(GR_LFB_READ_ONLY
, currentFB
,
349 GR_LFBWRITEMODE_ANY
, GR_ORIGIN_UPPER_LEFT
, FXFALSE
, &info
)) {
350 const GLint winX
= 0;
351 const GLint winY
= fxMesa
->height
- 1;
352 const GLushort
*data16
= (const GLushort
*)((const GLubyte
*)info
.lfbPtr
+
353 (winY
- y
) * info
.strideInBytes
+
355 const GLuint
*data32
= (const GLuint
*) data16
;
357 GLuint extraPixel
= (n
& 1);
360 for (i
= j
= 0; i
< n
; i
+= 2, j
++) {
361 GLuint pixel
= data32
[j
];
362 rgba
[i
][0] = FX_rgb_scale_5
[(pixel
>> 10) & 0x1F];
363 rgba
[i
][1] = FX_rgb_scale_5
[(pixel
>> 5) & 0x1F];
364 rgba
[i
][2] = FX_rgb_scale_5
[ pixel
& 0x1F];
365 rgba
[i
][3] = (pixel
& 0x8000) ? 255 : 0;
366 rgba
[i
+1][0] = FX_rgb_scale_5
[(pixel
>> 26) & 0x1F];
367 rgba
[i
+1][1] = FX_rgb_scale_5
[(pixel
>> 21) & 0x1F];
368 rgba
[i
+1][2] = FX_rgb_scale_5
[(pixel
>> 16) & 0x1F];
369 rgba
[i
+1][3] = (pixel
& 0x80000000) ? 255 : 0;
372 GLushort pixel
= data16
[n
];
373 rgba
[n
][0] = FX_rgb_scale_5
[(pixel
>> 10) & 0x1F];
374 rgba
[n
][1] = FX_rgb_scale_5
[(pixel
>> 5) & 0x1F];
375 rgba
[n
][2] = FX_rgb_scale_5
[ pixel
& 0x1F];
376 rgba
[n
][3] = (pixel
& 0x8000) ? 255 : 0;
379 grLfbUnlock(GR_LFB_READ_ONLY
, currentFB
);
384 * Read a span of 16-bit RGB pixels. Note, we don't worry about cliprects
385 * since OpenGL says obscured pixels have undefined values.
387 static void fxReadRGBASpan_RGB565 (const GLcontext
* ctx
,
388 struct gl_renderbuffer
*rb
,
393 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
394 GrBuffer_t currentFB
= GR_BUFFER_BACKBUFFER
;
396 info
.size
= sizeof(GrLfbInfo_t
);
397 if (grLfbLock(GR_LFB_READ_ONLY
, currentFB
,
398 GR_LFBWRITEMODE_ANY
, GR_ORIGIN_UPPER_LEFT
, FXFALSE
, &info
)) {
399 const GLint winX
= 0;
400 const GLint winY
= fxMesa
->height
- 1;
401 const GLushort
*data16
= (const GLushort
*)((const GLubyte
*)info
.lfbPtr
+
402 (winY
- y
) * info
.strideInBytes
+
404 const GLuint
*data32
= (const GLuint
*) data16
;
406 GLuint extraPixel
= (n
& 1);
409 for (i
= j
= 0; i
< n
; i
+= 2, j
++) {
410 GLuint pixel
= data32
[j
];
411 rgba
[i
][0] = FX_rgb_scale_5
[(pixel
>> 11) & 0x1F];
412 rgba
[i
][1] = FX_rgb_scale_6
[(pixel
>> 5) & 0x3F];
413 rgba
[i
][2] = FX_rgb_scale_5
[ pixel
& 0x1F];
415 rgba
[i
+1][0] = FX_rgb_scale_5
[(pixel
>> 27) & 0x1F];
416 rgba
[i
+1][1] = FX_rgb_scale_6
[(pixel
>> 21) & 0x3F];
417 rgba
[i
+1][2] = FX_rgb_scale_5
[(pixel
>> 16) & 0x1F];
421 GLushort pixel
= data16
[n
];
422 rgba
[n
][0] = FX_rgb_scale_5
[(pixel
>> 11) & 0x1F];
423 rgba
[n
][1] = FX_rgb_scale_6
[(pixel
>> 5) & 0x3F];
424 rgba
[n
][2] = FX_rgb_scale_5
[ pixel
& 0x1F];
428 grLfbUnlock(GR_LFB_READ_ONLY
, currentFB
);
433 * Read a span of 32-bit RGB pixels. Note, we don't worry about cliprects
434 * since OpenGL says obscured pixels have undefined values.
436 static void fxReadRGBASpan_ARGB8888 (const GLcontext
* ctx
,
437 struct gl_renderbuffer
*rb
,
442 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
443 GrBuffer_t currentFB
= GR_BUFFER_BACKBUFFER
;
445 grLfbReadRegion(currentFB
, x
, fxMesa
->height
- 1 - y
, n
, 1, n
* 4, rgba
);
446 for (i
= 0; i
< n
; i
++) {
447 GLubyte c
= rgba
[i
][0];
448 rgba
[i
][0] = rgba
[i
][2];
454 /************************************************************************/
455 /***** Depth functions (optimized) *****/
456 /************************************************************************/
459 fxReadDepthSpan_Z16(GLcontext
* ctx
, struct gl_renderbuffer
*rb
,
460 GLuint n
, GLint x
, GLint y
, GLuint depth
[])
462 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
463 GLint bottom
= fxMesa
->height
- 1;
464 GLushort depth16
[MAX_WIDTH
];
467 if (TDFX_DEBUG
& VERBOSE_DRIVER
) {
468 fprintf(stderr
, "fxReadDepthSpan_Z16(...)\n");
471 grLfbReadRegion(GR_BUFFER_AUXBUFFER
, x
, bottom
- y
, n
, 1, 0, depth16
);
472 for (i
= 0; i
< n
; i
++) {
473 depth
[i
] = depth16
[i
];
479 fxReadDepthSpan_Z24(GLcontext
* ctx
, struct gl_renderbuffer
*rb
,
480 GLuint n
, GLint x
, GLint y
, GLuint depth
[])
482 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
483 GLint bottom
= fxMesa
->height
- 1;
486 if (TDFX_DEBUG
& VERBOSE_DRIVER
) {
487 fprintf(stderr
, "fxReadDepthSpan_Z24(...)\n");
490 grLfbReadRegion(GR_BUFFER_AUXBUFFER
, x
, bottom
- y
, n
, 1, 0, depth
);
491 for (i
= 0; i
< n
; i
++) {
492 depth
[i
] &= 0xffffff;
497 /************************************************************************/
498 /***** Stencil functions (optimized) *****/
499 /************************************************************************/
502 fxWriteStencilSpan (GLcontext
*ctx
, struct gl_renderbuffer
*rb
,
503 GLuint n
, GLint x
, GLint y
,
504 const GLstencil stencil
[], const GLubyte mask
[])
512 fxReadStencilSpan(GLcontext
* ctx
, struct gl_renderbuffer
*rb
,
513 GLuint n
, GLint x
, GLint y
, GLstencil stencil
[])
515 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
516 GLint bottom
= fxMesa
->height
- 1;
517 GLuint zs32
[MAX_WIDTH
];
520 if (TDFX_DEBUG
& VERBOSE_DRIVER
) {
521 fprintf(stderr
, "fxReadStencilSpan(...)\n");
524 grLfbReadRegion(GR_BUFFER_AUXBUFFER
, x
, bottom
- y
, n
, 1, 0, zs32
);
525 for (i
= 0; i
< n
; i
++) {
526 stencil
[i
] = zs32
[i
] >> 24;
531 fxWriteStencilPixels (GLcontext
*ctx
, struct gl_renderbuffer
*rb
, GLuint n
,
532 const GLint x
[], const GLint y
[],
533 const GLstencil stencil
[],
534 const GLubyte mask
[])
542 fxReadStencilPixels (GLcontext
*ctx
, struct gl_renderbuffer
*rb
, GLuint n
,
543 const GLint x
[], const GLint y
[],
553 fxSetupDDSpanPointers(GLcontext
* ctx
)
555 struct swrast_device_driver
*swdd
= _swrast_GetDeviceDriverReference( ctx
);
556 fxMesaContext fxMesa
= FX_CONTEXT(ctx
);
558 switch (fxMesa
->colDepth
) {
560 swdd
->WriteRGBASpan
= tdfxWriteRGBASpan_ARGB1555
;
561 swdd
->WriteRGBSpan
= tdfxWriteRGBSpan_ARGB1555
;
562 swdd
->WriteRGBAPixels
= tdfxWriteRGBAPixels_ARGB1555
;
563 swdd
->WriteMonoRGBASpan
= tdfxWriteMonoRGBASpan_ARGB1555
;
564 swdd
->WriteMonoRGBAPixels
= tdfxWriteMonoRGBAPixels_ARGB1555
;
565 swdd
->ReadRGBASpan
= /*td*/fxReadRGBASpan_ARGB1555
;
566 swdd
->ReadRGBAPixels
= tdfxReadRGBAPixels_ARGB1555
;
568 swdd
->WriteDepthSpan
= tdfxWriteDepthSpan_Z16
;
569 swdd
->WriteDepthPixels
= tdfxWriteDepthPixels_Z16
;
570 swdd
->ReadDepthSpan
= /*td*/fxReadDepthSpan_Z16
;
571 swdd
->ReadDepthPixels
= tdfxReadDepthPixels_Z16
;
574 swdd
->WriteRGBASpan
= tdfxWriteRGBASpan_RGB565
;
575 swdd
->WriteRGBSpan
= tdfxWriteRGBSpan_RGB565
;
576 swdd
->WriteRGBAPixels
= tdfxWriteRGBAPixels_RGB565
;
577 swdd
->WriteMonoRGBASpan
= tdfxWriteMonoRGBASpan_RGB565
;
578 swdd
->WriteMonoRGBAPixels
= tdfxWriteMonoRGBAPixels_RGB565
;
579 swdd
->ReadRGBASpan
= /*td*/fxReadRGBASpan_RGB565
;
580 swdd
->ReadRGBAPixels
= tdfxReadRGBAPixels_RGB565
;
582 swdd
->WriteDepthSpan
= tdfxWriteDepthSpan_Z16
;
583 swdd
->WriteDepthPixels
= tdfxWriteDepthPixels_Z16
;
584 swdd
->ReadDepthSpan
= /*td*/fxReadDepthSpan_Z16
;
585 swdd
->ReadDepthPixels
= tdfxReadDepthPixels_Z16
;
588 swdd
->WriteRGBASpan
= tdfxWriteRGBASpan_ARGB8888
;
589 swdd
->WriteRGBSpan
= tdfxWriteRGBSpan_ARGB8888
;
590 swdd
->WriteRGBAPixels
= tdfxWriteRGBAPixels_ARGB8888
;
591 swdd
->WriteMonoRGBASpan
= tdfxWriteMonoRGBASpan_ARGB8888
;
592 swdd
->WriteMonoRGBAPixels
= tdfxWriteMonoRGBAPixels_ARGB8888
;
593 swdd
->ReadRGBASpan
= /*td*/fxReadRGBASpan_ARGB8888
;
594 swdd
->ReadRGBAPixels
= tdfxReadRGBAPixels_ARGB8888
;
596 swdd
->WriteDepthSpan
= tdfxWriteDepthSpan_Z24
;
597 swdd
->WriteDepthPixels
= tdfxWriteDepthPixels_Z24
;
598 swdd
->ReadDepthSpan
= /*td*/fxReadDepthSpan_Z24
;
599 swdd
->ReadDepthPixels
= tdfxReadDepthPixels_Z24
;
603 if (fxMesa
->haveHwStencil
) {
604 swdd
->WriteStencilSpan
= fxWriteStencilSpan
;
605 swdd
->ReadStencilSpan
= fxReadStencilSpan
;
606 swdd
->WriteStencilPixels
= fxWriteStencilPixels
;
607 swdd
->ReadStencilPixels
= fxReadStencilPixels
;
610 swdd
->WriteCI8Span
= NULL
;
611 swdd
->WriteCI32Span
= NULL
;
612 swdd
->WriteMonoCISpan
= NULL
;
613 swdd
->WriteCI32Pixels
= NULL
;
614 swdd
->WriteMonoCIPixels
= NULL
;
615 swdd
->ReadCI32Span
= NULL
;
616 swdd
->ReadCI32Pixels
= NULL
;
618 swdd
->SpanRenderStart
= tdfxSpanRenderStart
; /* BEGIN_BOARD_LOCK */
619 swdd
->SpanRenderFinish
= tdfxSpanRenderFinish
; /* END_BOARD_LOCK */
628 * Need this to provide at least one external definition.
631 extern int gl_fx_dummy_function_span(void);
633 gl_fx_dummy_function_span(void)