17117f1b4Smrg/*
27117f1b4Smrg * Mesa 3-D graphics library
37117f1b4Smrg *
47117f1b4Smrg * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
57117f1b4Smrg *
67117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a
77117f1b4Smrg * copy of this software and associated documentation files (the "Software"),
87117f1b4Smrg * to deal in the Software without restriction, including without limitation
97117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
107117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the
117117f1b4Smrg * Software is furnished to do so, subject to the following conditions:
127117f1b4Smrg *
137117f1b4Smrg * The above copyright notice and this permission notice shall be included
147117f1b4Smrg * in all copies or substantial portions of the Software.
157117f1b4Smrg *
167117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
177117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
187117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20af69d88dSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21af69d88dSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22af69d88dSmrg * OTHER DEALINGS IN THE SOFTWARE.
237117f1b4Smrg */
247117f1b4Smrg
257117f1b4Smrg
267117f1b4Smrg/*
277117f1b4Smrg * Line Rasterizer Template
287117f1b4Smrg *
297117f1b4Smrg * This file is #include'd to generate custom line rasterizers.
307117f1b4Smrg *
317117f1b4Smrg * The following macros may be defined to indicate what auxillary information
327117f1b4Smrg * must be interplated along the line:
337117f1b4Smrg *    INTERP_Z        - if defined, interpolate Z values
347117f1b4Smrg *    INTERP_ATTRIBS  - if defined, interpolate attribs (texcoords, varying, etc)
357117f1b4Smrg *
367117f1b4Smrg * When one can directly address pixels in the color buffer the following
377117f1b4Smrg * macros can be defined and used to directly compute pixel addresses during
387117f1b4Smrg * rasterization (see pixelPtr):
397117f1b4Smrg *    PIXEL_TYPE          - the datatype of a pixel (GLubyte, GLushort, GLuint)
407117f1b4Smrg *    BYTES_PER_ROW       - number of bytes per row in the color buffer
417117f1b4Smrg *    PIXEL_ADDRESS(X,Y)  - returns the address of pixel at (X,Y) where
427117f1b4Smrg *                          Y==0 at bottom of screen and increases upward.
437117f1b4Smrg *
447117f1b4Smrg * Similarly, for direct depth buffer access, this type is used for depth
457117f1b4Smrg * buffer addressing:
467117f1b4Smrg *    DEPTH_TYPE          - either GLushort or GLuint
477117f1b4Smrg *
487117f1b4Smrg * Optionally, one may provide one-time setup code
497117f1b4Smrg *    SETUP_CODE    - code which is to be executed once per line
507117f1b4Smrg *
517117f1b4Smrg * To actually "plot" each pixel the PLOT macro must be defined...
527117f1b4Smrg *    PLOT(X,Y) - code to plot a pixel.  Example:
537117f1b4Smrg *                if (Z < *zPtr) {
547117f1b4Smrg *                   *zPtr = Z;
557117f1b4Smrg *                   color = pack_rgb( FixedToInt(r0), FixedToInt(g0),
567117f1b4Smrg *                                     FixedToInt(b0) );
577117f1b4Smrg *                   put_pixel( X, Y, color );
587117f1b4Smrg *                }
597117f1b4Smrg *
607117f1b4Smrg * This code was designed for the origin to be in the lower-left corner.
617117f1b4Smrg *
627117f1b4Smrg */
637117f1b4Smrg
647117f1b4Smrg
657117f1b4Smrgstatic void
663464ebd5SriastradhNAME( struct gl_context *ctx, const SWvertex *vert0, const SWvertex *vert1 )
677117f1b4Smrg{
687117f1b4Smrg   const SWcontext *swrast = SWRAST_CONTEXT(ctx);
697117f1b4Smrg   SWspan span;
707117f1b4Smrg   GLuint interpFlags = 0;
71af69d88dSmrg   GLint x0 = (GLint) vert0->attrib[VARYING_SLOT_POS][0];
72af69d88dSmrg   GLint x1 = (GLint) vert1->attrib[VARYING_SLOT_POS][0];
73af69d88dSmrg   GLint y0 = (GLint) vert0->attrib[VARYING_SLOT_POS][1];
74af69d88dSmrg   GLint y1 = (GLint) vert1->attrib[VARYING_SLOT_POS][1];
757117f1b4Smrg   GLint dx, dy;
767117f1b4Smrg   GLint numPixels;
777117f1b4Smrg   GLint xstep, ystep;
787117f1b4Smrg#if defined(DEPTH_TYPE)
797117f1b4Smrg   const GLint depthBits = ctx->DrawBuffer->Visual.depthBits;
807117f1b4Smrg   const GLint fixedToDepthShift = depthBits <= 16 ? FIXED_SHIFT : 0;
817117f1b4Smrg   struct gl_renderbuffer *zrb = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
827117f1b4Smrg#define FixedToDepth(F)  ((F) >> fixedToDepthShift)
837117f1b4Smrg   GLint zPtrXstep, zPtrYstep;
847117f1b4Smrg   DEPTH_TYPE *zPtr;
857117f1b4Smrg#elif defined(INTERP_Z)
867117f1b4Smrg   const GLint depthBits = ctx->DrawBuffer->Visual.depthBits;
877117f1b4Smrg#endif
887117f1b4Smrg#ifdef PIXEL_ADDRESS
897117f1b4Smrg   PIXEL_TYPE *pixelPtr;
907117f1b4Smrg   GLint pixelXstep, pixelYstep;
917117f1b4Smrg#endif
927117f1b4Smrg
937117f1b4Smrg#ifdef SETUP_CODE
947117f1b4Smrg   SETUP_CODE
957117f1b4Smrg#endif
967117f1b4Smrg
977117f1b4Smrg   (void) swrast;
987117f1b4Smrg
997117f1b4Smrg   /* Cull primitives with malformed coordinates.
1007117f1b4Smrg    */
1017117f1b4Smrg   {
102af69d88dSmrg      GLfloat tmp = vert0->attrib[VARYING_SLOT_POS][0] + vert0->attrib[VARYING_SLOT_POS][1]
103af69d88dSmrg                  + vert1->attrib[VARYING_SLOT_POS][0] + vert1->attrib[VARYING_SLOT_POS][1];
1047ec681f3Smrg      if (util_is_inf_or_nan(tmp))
1057117f1b4Smrg	 return;
1067117f1b4Smrg   }
1077117f1b4Smrg
1087117f1b4Smrg   /*
10901e04c3fSmrg   printf("%s():\n", __func__);
1107117f1b4Smrg   printf(" (%f, %f, %f) -> (%f, %f, %f)\n",
111af69d88dSmrg          vert0->attrib[VARYING_SLOT_POS][0],
112af69d88dSmrg          vert0->attrib[VARYING_SLOT_POS][1],
113af69d88dSmrg          vert0->attrib[VARYING_SLOT_POS][2],
114af69d88dSmrg          vert1->attrib[VARYING_SLOT_POS][0],
115af69d88dSmrg          vert1->attrib[VARYING_SLOT_POS][1],
116af69d88dSmrg          vert1->attrib[VARYING_SLOT_POS][2]);
1177117f1b4Smrg   printf(" (%d, %d, %d) -> (%d, %d, %d)\n",
1187117f1b4Smrg          vert0->color[0], vert0->color[1], vert0->color[2],
1197117f1b4Smrg          vert1->color[0], vert1->color[1], vert1->color[2]);
1207117f1b4Smrg   printf(" (%d, %d, %d) -> (%d, %d, %d)\n",
1217117f1b4Smrg          vert0->specular[0], vert0->specular[1], vert0->specular[2],
1227117f1b4Smrg          vert1->specular[0], vert1->specular[1], vert1->specular[2]);
1237117f1b4Smrg   */
1247117f1b4Smrg
1257117f1b4Smrg/*
1267117f1b4Smrg * Despite being clipped to the view volume, the line's window coordinates
1277117f1b4Smrg * may just lie outside the window bounds.  That is, if the legal window
1287117f1b4Smrg * coordinates are [0,W-1][0,H-1], it's possible for x==W and/or y==H.
1297117f1b4Smrg * This quick and dirty code nudges the endpoints inside the window if
1307117f1b4Smrg * necessary.
1317117f1b4Smrg */
1327117f1b4Smrg#ifdef CLIP_HACK
1337117f1b4Smrg   {
1347117f1b4Smrg      GLint w = ctx->DrawBuffer->Width;
1357117f1b4Smrg      GLint h = ctx->DrawBuffer->Height;
1367117f1b4Smrg      if ((x0==w) | (x1==w)) {
1377117f1b4Smrg         if ((x0==w) & (x1==w))
1387117f1b4Smrg           return;
1397117f1b4Smrg         x0 -= x0==w;
1407117f1b4Smrg         x1 -= x1==w;
1417117f1b4Smrg      }
1427117f1b4Smrg      if ((y0==h) | (y1==h)) {
1437117f1b4Smrg         if ((y0==h) & (y1==h))
1447117f1b4Smrg           return;
1457117f1b4Smrg         y0 -= y0==h;
1467117f1b4Smrg         y1 -= y1==h;
1477117f1b4Smrg      }
1487117f1b4Smrg   }
1497117f1b4Smrg#endif
1507117f1b4Smrg
1517117f1b4Smrg   dx = x1 - x0;
1527117f1b4Smrg   dy = y1 - y0;
1537117f1b4Smrg   if (dx == 0 && dy == 0)
1547117f1b4Smrg      return;
1557117f1b4Smrg
156c1f859d4Smrg   /*
15701e04c3fSmrg   printf("%s %d,%d  %g %g %g %g  %g %g %g %g\n", __func__, dx, dy,
158af69d88dSmrg          vert0->attrib[VARYING_SLOT_COL1][0],
159af69d88dSmrg          vert0->attrib[VARYING_SLOT_COL1][1],
160af69d88dSmrg          vert0->attrib[VARYING_SLOT_COL1][2],
161af69d88dSmrg          vert0->attrib[VARYING_SLOT_COL1][3],
162af69d88dSmrg          vert1->attrib[VARYING_SLOT_COL1][0],
163af69d88dSmrg          vert1->attrib[VARYING_SLOT_COL1][1],
164af69d88dSmrg          vert1->attrib[VARYING_SLOT_COL1][2],
165af69d88dSmrg          vert1->attrib[VARYING_SLOT_COL1][3]);
166c1f859d4Smrg   */
167c1f859d4Smrg
1687117f1b4Smrg#ifdef DEPTH_TYPE
169af69d88dSmrg   zPtr = (DEPTH_TYPE *) _swrast_pixel_address(zrb, x0, y0);
1707117f1b4Smrg#endif
1717117f1b4Smrg#ifdef PIXEL_ADDRESS
1727117f1b4Smrg   pixelPtr = (PIXEL_TYPE *) PIXEL_ADDRESS(x0,y0);
1737117f1b4Smrg#endif
1747117f1b4Smrg
1757117f1b4Smrg   if (dx<0) {
1767117f1b4Smrg      dx = -dx;   /* make positive */
1777117f1b4Smrg      xstep = -1;
1787117f1b4Smrg#ifdef DEPTH_TYPE
1797117f1b4Smrg      zPtrXstep = -((GLint)sizeof(DEPTH_TYPE));
1807117f1b4Smrg#endif
1817117f1b4Smrg#ifdef PIXEL_ADDRESS
1827117f1b4Smrg      pixelXstep = -((GLint)sizeof(PIXEL_TYPE));
1837117f1b4Smrg#endif
1847117f1b4Smrg   }
1857117f1b4Smrg   else {
1867117f1b4Smrg      xstep = 1;
1877117f1b4Smrg#ifdef DEPTH_TYPE
1887117f1b4Smrg      zPtrXstep = ((GLint)sizeof(DEPTH_TYPE));
1897117f1b4Smrg#endif
1907117f1b4Smrg#ifdef PIXEL_ADDRESS
1917117f1b4Smrg      pixelXstep = ((GLint)sizeof(PIXEL_TYPE));
1927117f1b4Smrg#endif
1937117f1b4Smrg   }
1947117f1b4Smrg
1957117f1b4Smrg   if (dy<0) {
1967117f1b4Smrg      dy = -dy;   /* make positive */
1977117f1b4Smrg      ystep = -1;
1987117f1b4Smrg#ifdef DEPTH_TYPE
1997117f1b4Smrg      zPtrYstep = -((GLint) (ctx->DrawBuffer->Width * sizeof(DEPTH_TYPE)));
2007117f1b4Smrg#endif
2017117f1b4Smrg#ifdef PIXEL_ADDRESS
2027117f1b4Smrg      pixelYstep = BYTES_PER_ROW;
2037117f1b4Smrg#endif
2047117f1b4Smrg   }
2057117f1b4Smrg   else {
2067117f1b4Smrg      ystep = 1;
2077117f1b4Smrg#ifdef DEPTH_TYPE
2087117f1b4Smrg      zPtrYstep = (GLint) (ctx->DrawBuffer->Width * sizeof(DEPTH_TYPE));
2097117f1b4Smrg#endif
2107117f1b4Smrg#ifdef PIXEL_ADDRESS
2117117f1b4Smrg      pixelYstep = -(BYTES_PER_ROW);
2127117f1b4Smrg#endif
2137117f1b4Smrg   }
2147117f1b4Smrg
21501e04c3fSmrg   assert(dx >= 0);
21601e04c3fSmrg   assert(dy >= 0);
2177117f1b4Smrg
2187117f1b4Smrg   numPixels = MAX2(dx, dy);
2197117f1b4Smrg
2207117f1b4Smrg   /*
2217117f1b4Smrg    * Span setup: compute start and step values for all interpolated values.
2227117f1b4Smrg    */
2237117f1b4Smrg   interpFlags |= SPAN_RGBA;
2247117f1b4Smrg   if (ctx->Light.ShadeModel == GL_SMOOTH) {
2257117f1b4Smrg      span.red   = ChanToFixed(vert0->color[0]);
2267117f1b4Smrg      span.green = ChanToFixed(vert0->color[1]);
2277117f1b4Smrg      span.blue  = ChanToFixed(vert0->color[2]);
2287117f1b4Smrg      span.alpha = ChanToFixed(vert0->color[3]);
2297117f1b4Smrg      span.redStep   = (ChanToFixed(vert1->color[0]) - span.red  ) / numPixels;
2307117f1b4Smrg      span.greenStep = (ChanToFixed(vert1->color[1]) - span.green) / numPixels;
2317117f1b4Smrg      span.blueStep  = (ChanToFixed(vert1->color[2]) - span.blue ) / numPixels;
2327117f1b4Smrg      span.alphaStep = (ChanToFixed(vert1->color[3]) - span.alpha) / numPixels;
2337117f1b4Smrg   }
2347117f1b4Smrg   else {
2357117f1b4Smrg      span.red   = ChanToFixed(vert1->color[0]);
2367117f1b4Smrg      span.green = ChanToFixed(vert1->color[1]);
2377117f1b4Smrg      span.blue  = ChanToFixed(vert1->color[2]);
2387117f1b4Smrg      span.alpha = ChanToFixed(vert1->color[3]);
2397117f1b4Smrg      span.redStep   = 0;
2407117f1b4Smrg      span.greenStep = 0;
2417117f1b4Smrg      span.blueStep  = 0;
2427117f1b4Smrg      span.alphaStep = 0;
2437117f1b4Smrg   }
2447117f1b4Smrg#if defined(INTERP_Z) || defined(DEPTH_TYPE)
2457117f1b4Smrg   interpFlags |= SPAN_Z;
2467117f1b4Smrg   {
2477117f1b4Smrg      if (depthBits <= 16) {
248af69d88dSmrg         span.z = FloatToFixed(vert0->attrib[VARYING_SLOT_POS][2]) + FIXED_HALF;
249af69d88dSmrg         span.zStep = FloatToFixed(  vert1->attrib[VARYING_SLOT_POS][2]
250af69d88dSmrg                                   - vert0->attrib[VARYING_SLOT_POS][2]) / numPixels;
2517117f1b4Smrg      }
2527117f1b4Smrg      else {
2537117f1b4Smrg         /* don't use fixed point */
254af69d88dSmrg         span.z = (GLuint) vert0->attrib[VARYING_SLOT_POS][2];
255af69d88dSmrg         span.zStep = (GLint) ((  vert1->attrib[VARYING_SLOT_POS][2]
256af69d88dSmrg                                - vert0->attrib[VARYING_SLOT_POS][2]) / numPixels);
2577117f1b4Smrg      }
2587117f1b4Smrg   }
2597117f1b4Smrg#endif
2607117f1b4Smrg#if defined(INTERP_ATTRIBS)
2617117f1b4Smrg   {
2627117f1b4Smrg      const GLfloat invLen = 1.0F / numPixels;
263af69d88dSmrg      const GLfloat invw0 = vert0->attrib[VARYING_SLOT_POS][3];
264af69d88dSmrg      const GLfloat invw1 = vert1->attrib[VARYING_SLOT_POS][3];
265c1f859d4Smrg
266af69d88dSmrg      span.attrStart[VARYING_SLOT_POS][3] = invw0;
267af69d88dSmrg      span.attrStepX[VARYING_SLOT_POS][3] = (invw1 - invw0) * invLen;
268af69d88dSmrg      span.attrStepY[VARYING_SLOT_POS][3] = 0.0;
269c1f859d4Smrg
2707117f1b4Smrg      ATTRIB_LOOP_BEGIN
271c1f859d4Smrg         if (swrast->_InterpMode[attr] == GL_FLAT) {
272c1f859d4Smrg            COPY_4V(span.attrStart[attr], vert1->attrib[attr]);
273c1f859d4Smrg            ASSIGN_4V(span.attrStepX[attr], 0.0, 0.0, 0.0, 0.0);
274c1f859d4Smrg         }
275c1f859d4Smrg         else {
276c1f859d4Smrg            GLuint c;
277c1f859d4Smrg            for (c = 0; c < 4; c++) {
278c1f859d4Smrg               float da;
279c1f859d4Smrg               span.attrStart[attr][c] = invw0 * vert0->attrib[attr][c];
280c1f859d4Smrg               da = (invw1 * vert1->attrib[attr][c]) - span.attrStart[attr][c];
281c1f859d4Smrg               span.attrStepX[attr][c] = da * invLen;
282c1f859d4Smrg            }
283c1f859d4Smrg         }
284c1f859d4Smrg         ASSIGN_4V(span.attrStepY[attr], 0.0, 0.0, 0.0, 0.0);
2857117f1b4Smrg      ATTRIB_LOOP_END
2867117f1b4Smrg   }
2877117f1b4Smrg#endif
2887117f1b4Smrg
289c1f859d4Smrg   INIT_SPAN(span, GL_LINE);
290c1f859d4Smrg   span.end = numPixels;
291c1f859d4Smrg   span.interpMask = interpFlags;
292c1f859d4Smrg   span.arrayMask = SPAN_XY;
2937117f1b4Smrg
2947117f1b4Smrg   span.facing = swrast->PointLineFacing;
2957117f1b4Smrg
2967117f1b4Smrg
2977117f1b4Smrg   /*
2987117f1b4Smrg    * Draw
2997117f1b4Smrg    */
3007117f1b4Smrg
3017117f1b4Smrg   if (dx > dy) {
3027117f1b4Smrg      /*** X-major line ***/
3037117f1b4Smrg      GLint i;
3047117f1b4Smrg      GLint errorInc = dy+dy;
3057117f1b4Smrg      GLint error = errorInc-dx;
3067117f1b4Smrg      GLint errorDec = error-dx;
3077117f1b4Smrg
3087117f1b4Smrg      for (i = 0; i < dx; i++) {
3097117f1b4Smrg#ifdef DEPTH_TYPE
3107117f1b4Smrg         GLuint Z = FixedToDepth(span.z);
3117117f1b4Smrg#endif
3127117f1b4Smrg#ifdef PLOT
3137117f1b4Smrg         PLOT( x0, y0 );
3147117f1b4Smrg#else
3157117f1b4Smrg         span.array->x[i] = x0;
3167117f1b4Smrg         span.array->y[i] = y0;
3177117f1b4Smrg#endif
3187117f1b4Smrg         x0 += xstep;
3197117f1b4Smrg#ifdef DEPTH_TYPE
3207117f1b4Smrg         zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrXstep);
3217117f1b4Smrg         span.z += span.zStep;
3227117f1b4Smrg#endif
3237117f1b4Smrg#ifdef PIXEL_ADDRESS
3247117f1b4Smrg         pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelXstep);
3257117f1b4Smrg#endif
326c1f859d4Smrg         if (error < 0) {
3277117f1b4Smrg            error += errorInc;
3287117f1b4Smrg         }
3297117f1b4Smrg         else {
3307117f1b4Smrg            error += errorDec;
3317117f1b4Smrg            y0 += ystep;
3327117f1b4Smrg#ifdef DEPTH_TYPE
3337117f1b4Smrg            zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrYstep);
3347117f1b4Smrg#endif
3357117f1b4Smrg#ifdef PIXEL_ADDRESS
3367117f1b4Smrg            pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelYstep);
3377117f1b4Smrg#endif
3387117f1b4Smrg         }
3397117f1b4Smrg      }
3407117f1b4Smrg   }
3417117f1b4Smrg   else {
3427117f1b4Smrg      /*** Y-major line ***/
3437117f1b4Smrg      GLint i;
3447117f1b4Smrg      GLint errorInc = dx+dx;
3457117f1b4Smrg      GLint error = errorInc-dy;
3467117f1b4Smrg      GLint errorDec = error-dy;
3477117f1b4Smrg
3487117f1b4Smrg      for (i=0;i<dy;i++) {
3497117f1b4Smrg#ifdef DEPTH_TYPE
3507117f1b4Smrg         GLuint Z = FixedToDepth(span.z);
3517117f1b4Smrg#endif
3527117f1b4Smrg#ifdef PLOT
3537117f1b4Smrg         PLOT( x0, y0 );
3547117f1b4Smrg#else
3557117f1b4Smrg         span.array->x[i] = x0;
3567117f1b4Smrg         span.array->y[i] = y0;
3577117f1b4Smrg#endif
3587117f1b4Smrg         y0 += ystep;
3597117f1b4Smrg#ifdef DEPTH_TYPE
3607117f1b4Smrg         zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrYstep);
3617117f1b4Smrg         span.z += span.zStep;
3627117f1b4Smrg#endif
3637117f1b4Smrg#ifdef PIXEL_ADDRESS
3647117f1b4Smrg         pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelYstep);
3657117f1b4Smrg#endif
3667117f1b4Smrg         if (error<0) {
3677117f1b4Smrg            error += errorInc;
3687117f1b4Smrg         }
3697117f1b4Smrg         else {
3707117f1b4Smrg            error += errorDec;
3717117f1b4Smrg            x0 += xstep;
3727117f1b4Smrg#ifdef DEPTH_TYPE
3737117f1b4Smrg            zPtr = (DEPTH_TYPE *) ((GLubyte*) zPtr + zPtrXstep);
3747117f1b4Smrg#endif
3757117f1b4Smrg#ifdef PIXEL_ADDRESS
3767117f1b4Smrg            pixelPtr = (PIXEL_TYPE*) ((GLubyte*) pixelPtr + pixelXstep);
3777117f1b4Smrg#endif
3787117f1b4Smrg         }
3797117f1b4Smrg      }
3807117f1b4Smrg   }
3817117f1b4Smrg
3827117f1b4Smrg#ifdef RENDER_SPAN
3837117f1b4Smrg   RENDER_SPAN( span );
3847117f1b4Smrg#endif
3857117f1b4Smrg
3867117f1b4Smrg   (void)span;
3877117f1b4Smrg
3887117f1b4Smrg}
3897117f1b4Smrg
3907117f1b4Smrg
3917117f1b4Smrg#undef NAME
3927117f1b4Smrg#undef INTERP_Z
3937117f1b4Smrg#undef INTERP_ATTRIBS
3947117f1b4Smrg#undef PIXEL_ADDRESS
3957117f1b4Smrg#undef PIXEL_TYPE
3967117f1b4Smrg#undef DEPTH_TYPE
3977117f1b4Smrg#undef BYTES_PER_ROW
3987117f1b4Smrg#undef SETUP_CODE
3997117f1b4Smrg#undef PLOT
4007117f1b4Smrg#undef CLIP_HACK
4017117f1b4Smrg#undef FixedToDepth
4027117f1b4Smrg#undef RENDER_SPAN
403