-
-/*
- * XImage, flat, depth-buffered, PF_DITHER triangle.
- */
-#define NAME flat_DITHER_z_triangle
-#define INTERP_Z 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
-#define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- XMesaImage *img = xmesa->xm_buffer->backimage; \
- FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
-#define RENDER_SPAN( span ) \
- GLuint i; \
- GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
- FLAT_DITHER_ROW_SETUP(y); \
- for (i = 0; i < span.end; i++, x++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
- if (z < zRow[i]) { \
- unsigned long p = FLAT_DITHER(x); \
- XMesaPutPixel(img, x, y, p); \
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
- }
-#include "swrast/s_tritemp.h"
-
-
-
-/*
- * XImage, flat, depth-buffered, 8-bit PF_HPCR triangle.
- */
-#define NAME flat_HPCR_z_triangle
-#define INTERP_Z 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
-#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y)
-#define PIXEL_TYPE GLubyte
-#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
-#define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GLubyte r = v2->color[0]; \
- GLubyte g = v2->color[1]; \
- GLubyte b = v2->color[2];
-#define RENDER_SPAN( span ) \
- GLuint i; \
- GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
- if (z < zRow[i]) { \
- pRow[i] = (PIXEL_TYPE) DITHER_HPCR(x, y, r, g, b); \
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
- }
-#include "swrast/s_tritemp.h"
-
-
-
-/*
- * XImage, flat, depth-buffered, 8-bit PF_LOOKUP triangle.
- */
-#define NAME flat_LOOKUP8_z_triangle
-#define INTERP_Z 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
-#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y)
-#define PIXEL_TYPE GLubyte
-#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
-#define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- LOOKUP_SETUP; \
- GLubyte r = v2->color[0]; \
- GLubyte g = v2->color[1]; \
- GLubyte b = v2->color[2]; \
- GLubyte p = LOOKUP(r,g,b);
-#define RENDER_SPAN( span ) \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
- if (z < zRow[i]) { \
- pRow[i] = p; \
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
- }
-#include "swrast/s_tritemp.h"
-
-
-