core  array_cache  math  swrast  swrast_setup  tnl  tnl_dd 
Main Page   Modules   Data Structures   File List   Data Fields   Globals  

sw_span Struct Reference

Contains data for either a horizontal line or a set of pixels that are passed through a pipeline of functions before being drawn. More...

#include <s_context.h>


Data Fields

GLint x
GLint y
GLuint start
 At this time, start is always zero. More...

GLuint end
 At this time, start is always zero. More...

GLboolean writeAll
 This flag indicates that mask[] array is effectively filled with ones. More...

GLenum primitive
 either GL_POLYGON, GL_LINE, GL_POLYGON, GL_BITMAP. More...

GLuint facing
 0 = front-facing span, 1 = back-facing span (for two-sided stencil). More...

GLuint interpMask
 This bitmask (of SPAN_* flags) indicates which of the x/xStep variables are relevant. More...

GLfloat red
GLfloat redStep
GLfloat green
GLfloat greenStep
GLfloat blue
GLfloat blueStep
GLfloat alpha
GLfloat alphaStep
GLfloat specRed
GLfloat specRedStep
GLfloat specGreen
GLfloat specGreenStep
GLfloat specBlue
GLfloat specBlueStep
GLfixed index
GLfixed indexStep
GLfixed z
GLfixed zStep
GLfloat fog
GLfloat fogStep
GLfloat tex [MAX_TEXTURE_COORD_UNITS][4]
GLfloat texStepX [MAX_TEXTURE_COORD_UNITS][4]
GLfloat texStepY [MAX_TEXTURE_COORD_UNITS][4]
GLfixed intTex [2]
GLfixed intTexStep [2]
GLfloat dzdx
GLfloat dzdy
GLfloat w
GLfloat dwdx
GLfloat dwdy
GLfloat drdx
GLfloat drdy
GLfloat dgdx
GLfloat dgdy
GLfloat dbdx
GLfloat dbdy
GLfloat dadx
GLfloat dady
GLfloat dsrdx
GLfloat dsrdy
GLfloat dsgdx
GLfloat dsgdy
GLfloat dsbdx
GLfloat dsbdy
GLfloat dfogdx
GLfloat dfogdy
GLuint arrayMask
 This bitmask (of SPAN_* flags) indicates which of the fragment arrays in the span_arrays struct are relevant. More...

span_arraysarray
 We store the arrays of fragment values in a separate struct so that we can allocate sw_span structs on the stack without using a lot of memory. More...


Detailed Description

Contains data for either a horizontal line or a set of pixels that are passed through a pipeline of functions before being drawn.

The sw_span structure describes the colors, Z, fogcoord, texcoords, etc for either a horizontal run or an array of independent pixels. We can either specify a base/step to indicate interpolated values, or fill in arrays of values. The interpMask and arrayMask bitfields indicate which are active.

With this structure it's easy to hand-off span rasterization to subroutines instead of doing it all inline in the triangle functions like we used to do. It also cleans up the local variable namespace a great deal.

It would be interesting to experiment with multiprocessor rasterization with this structure. The triangle rasterizer could simply emit a stream of these structures which would be consumed by one or more span-processing threads which could run in parallel.


Field Documentation

GLfloat sw_span::alpha
 

GLfloat sw_span::alphaStep
 

struct span_arrays* sw_span::array
 

We store the arrays of fragment values in a separate struct so that we can allocate sw_span structs on the stack without using a lot of memory.

The span_arrays struct is about 400KB while the sw_span struct is only about 512 bytes.

GLuint sw_span::arrayMask
 

This bitmask (of SPAN_* flags) indicates which of the fragment arrays in the span_arrays struct are relevant.

GLfloat sw_span::blue
 

GLfloat sw_span::blueStep
 

GLfloat sw_span::dadx
 

GLfloat sw_span::dady
 

GLfloat sw_span::dbdx
 

GLfloat sw_span::dbdy
 

GLfloat sw_span::dfogdx
 

GLfloat sw_span::dfogdy
 

GLfloat sw_span::dgdx
 

GLfloat sw_span::dgdy
 

GLfloat sw_span::drdx
 

GLfloat sw_span::drdy
 

GLfloat sw_span::dsbdx
 

GLfloat sw_span::dsbdy
 

GLfloat sw_span::dsgdx
 

GLfloat sw_span::dsgdy
 

GLfloat sw_span::dsrdx
 

GLfloat sw_span::dsrdy
 

GLfloat sw_span::dwdx
 

GLfloat sw_span::dwdy
 

GLfloat sw_span::dzdx
 

GLfloat sw_span::dzdy
 

GLuint sw_span::end
 

At this time, start is always zero.

GLuint sw_span::facing
 

0 = front-facing span, 1 = back-facing span (for two-sided stencil).

GLfloat sw_span::fog
 

GLfloat sw_span::fogStep
 

GLfloat sw_span::green
 

GLfloat sw_span::greenStep
 

GLfixed sw_span::index
 

GLfixed sw_span::indexStep
 

GLuint sw_span::interpMask
 

This bitmask (of SPAN_* flags) indicates which of the x/xStep variables are relevant.

GLfixed sw_span::intTex[2]
 

GLfixed sw_span::intTexStep[2]
 

GLenum sw_span::primitive
 

either GL_POLYGON, GL_LINE, GL_POLYGON, GL_BITMAP.

GLfloat sw_span::red
 

GLfloat sw_span::redStep
 

GLfloat sw_span::specBlue
 

GLfloat sw_span::specBlueStep
 

GLfloat sw_span::specGreen
 

GLfloat sw_span::specGreenStep
 

GLfloat sw_span::specRed
 

GLfloat sw_span::specRedStep
 

GLuint sw_span::start
 

At this time, start is always zero.

GLfloat sw_span::tex[MAX_TEXTURE_COORD_UNITS][4]
 

GLfloat sw_span::texStepX[MAX_TEXTURE_COORD_UNITS][4]
 

GLfloat sw_span::texStepY[MAX_TEXTURE_COORD_UNITS][4]
 

GLfloat sw_span::w
 

GLboolean sw_span::writeAll
 

This flag indicates that mask[] array is effectively filled with ones.

GLint sw_span::x
 

GLint sw_span::y
 

GLfixed sw_span::z
 

GLfixed sw_span::zStep
 


The documentation for this struct was generated from the following file:
Generated on Sun May 16 15:55:22 2004 for Mesa Software Rasterization (swrast) by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001