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>
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::alphaStep
|
|
|
|
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
|
|
| GLfloat sw_span::blueStep
|
|
|
|
At this time, start is always zero.
|
|
|
0 = front-facing span, 1 = back-facing span (for two-sided stencil).
|
| GLfloat sw_span::greenStep
|
|
| GLuint sw_span::interpMask
|
|
|
|
This bitmask (of SPAN_* flags) indicates which of the x/xStep variables are relevant.
|
| GLenum sw_span::primitive
|
|
|
|
either GL_POLYGON, GL_LINE, GL_POLYGON, GL_BITMAP.
|
| GLfloat sw_span::specBlue
|
|
| GLfloat sw_span::specBlueStep
|
|
| GLfloat sw_span::specGreen
|
|
| GLfloat sw_span::specGreenStep
|
|
| GLfloat sw_span::specRedStep
|
|
|
|
At this time, start is always zero.
|
| GLboolean sw_span::writeAll
|
|
|
|
This flag indicates that mask[] array is effectively filled with ones.
|
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
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001