GLfloat texWidth[MAX_TEXTURE_COORD_UNITS];
GLfloat texHeight[MAX_TEXTURE_COORD_UNITS];
- struct sw_span span;
+ SWspan span;
};
GLboolean ltor;
GLfloat majDx, majDy; /* major (i.e. long) edge dx and dy */
- struct sw_span span;
+ SWspan span;
#ifdef DO_Z
GLfloat zPlane[4];
while (coverage > 0.0F) {
/* (cx,cy) = center of fragment */
const GLfloat cx = ix + 0.5F, cy = iy + 0.5F;
- struct span_arrays *array = span.array;
+ SWspanarrays *array = span.array;
#ifdef DO_INDEX
array->coverage[count] = (GLfloat) compute_coveragei(pMin, pMid, pMax, ix, iy);
#else
while (coverage > 0.0F) {
/* (cx,cy) = center of fragment */
const GLfloat cx = ix + 0.5F, cy = iy + 0.5F;
- struct span_arrays *array = span.array;
+ SWspanarrays *array = span.array;
#ifdef DO_INDEX
array->coverage[ix] = (GLfloat) compute_coveragei(pMin, pMax, pMid, ix, iy);
#else
/* shift all values to the left */
/* XXX this is temporary */
{
- struct span_arrays *array = span.array;
+ SWspanarrays *array = span.array;
GLint j;
for (j = 0; j < (GLint) n; j++) {
#ifdef DO_RGBA
#ifdef DO_MULTITEX
/* shift texcoords */
{
- struct span_arrays *array = span.array;
+ SWspanarrays *array = span.array;
GLuint unit;
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
if (ctx->Texture.Unit[unit]._ReallyEnabled) {
for (i = 0; i < height; i++) {
GLshort accumRow[4 * MAX_WIDTH];
GLshort *acc;
- struct sw_span span;
+ SWspan span;
/* init color span */
INIT_SPAN(span, GL_BITMAP, width, 0, SPAN_RGBA);
* 1 if one or more pixels passed the alpha test.
*/
GLint
-_swrast_alpha_test(const GLcontext *ctx, struct sw_span *span)
+_swrast_alpha_test(const GLcontext *ctx, SWspan *span)
{
const GLuint n = span->end;
GLubyte *mask = span->array->mask;
extern GLint
-_swrast_alpha_test( const GLcontext *ctx, struct sw_span *span );
+_swrast_alpha_test( const GLcontext *ctx, SWspan *span );
#endif
#if FEATURE_ARB_fragment_shader
void
-_swrast_exec_arbshader(GLcontext *ctx, struct sw_span *span)
+_swrast_exec_arbshader(GLcontext *ctx, SWspan *span)
{
struct gl2_program_intf **pro;
GLuint i;
#if FEATURE_ARB_fragment_shader
-extern void _swrast_exec_arbshader (GLcontext *ctx, struct sw_span *span);
+extern void _swrast_exec_arbshader (GLcontext *ctx, SWspan *span);
#endif /* FEATURE_ARB_fragment_shader */
static void
handle_pass_op(struct atifs_machine *machine, struct atifs_setupinst *texinst,
- const struct sw_span *span, GLuint column, GLuint idx)
+ const SWspan *span, GLuint column, GLuint idx)
{
GLuint swizzle = texinst->swizzle;
GLuint pass_tex = texinst->src;
static void
handle_sample_op(GLcontext * ctx, struct atifs_machine *machine,
- struct atifs_setupinst *texinst, const struct sw_span *span,
+ struct atifs_setupinst *texinst, const SWspan *span,
GLuint column, GLuint idx)
{
/* sample from unit idx using texinst->src as coords */
static GLboolean
execute_shader(GLcontext * ctx,
const struct ati_fragment_shader *shader, GLuint maxInst,
- struct atifs_machine *machine, const struct sw_span *span,
+ struct atifs_machine *machine, const SWspan *span,
GLuint column)
{
GLuint pc;
static void
init_machine(GLcontext * ctx, struct atifs_machine *machine,
const struct ati_fragment_shader *shader,
- const struct sw_span *span, GLuint col)
+ const SWspan *span, GLuint col)
{
GLint i, j;
* Execute the current fragment program, operating on the given span.
*/
void
-_swrast_exec_fragment_shader(GLcontext * ctx, struct sw_span *span)
+_swrast_exec_fragment_shader(GLcontext * ctx, SWspan *span)
{
const struct ati_fragment_shader *shader = ctx->ATIFragmentShader.Current;
GLuint i;
extern void
-_swrast_exec_fragment_shader( GLcontext *ctx, struct sw_span *span );
+_swrast_exec_fragment_shader( GLcontext *ctx, SWspan *span );
#endif
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLint row, col;
GLuint count = 0;
- struct sw_span span;
+ SWspan span;
ASSERT(ctx->RenderMode == GL_RENDER);
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLint row, col;
- struct sw_span span;
+ SWspan span;
ASSERT(ctx->RenderMode == GL_RENDER);
ASSERT(bitmap);
* pixel coordinates.
*/
void
-_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span)
+_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, SWspan *span)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
void *rbPixels;
extern void
-_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span);
+_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, SWspan *span);
extern void
const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
GLchan clearColor[4];
- struct sw_span span;
+ SWspan span;
GLint i;
ASSERT(ctx->Visual.rgbMode);
const GLint y = ctx->DrawBuffer->_Ymin;
const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
- struct sw_span span;
+ SWspan span;
GLint i;
ASSERT(!ctx->Visual.rgbMode);
for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
swrast->TextureSample[i] = NULL;
- swrast->SpanArrays = MALLOC_STRUCT(span_arrays);
+ swrast->SpanArrays = MALLOC_STRUCT(sw_span_arrays);
if (!swrast->SpanArrays) {
FREE(swrast);
return GL_FALSE;
/**
* \defgroup SpanFlags SPAN_XXX-flags
- * Bitmasks to indicate which span_arrays need to be computed
+ * Bitmasks to indicate which sw_span_arrays need to be computed
* (sw_span::interpMask) or have already been filled in (sw_span::arrayMask)
*/
/*@{*/
/**
- * \struct span_arrays
+ * \sw_span_arrays
* \brief Arrays of fragment values.
*
* These will either be computed from the x/xStep values above or
* filled in by glDraw/CopyPixels, etc.
* These arrays are separated out of sw_span to conserve memory.
*/
-struct span_arrays {
+typedef struct sw_span_arrays {
GLenum ChanType; /**< Color channel type, GL_UNSIGNED_BYTE, GL_FLOAT */
union {
struct {
/** This mask indicates which fragments are alive or culled */
GLubyte mask[MAX_WIDTH];
-};
+} SWspanarrays;
/**
- * \struct sw_span
+ * \SWspan
* \brief Contains data for either a horizontal line or a set of
* pixels that are passed through a pipeline of functions before being
* drawn.
* stream of these structures which would be consumed by one or more
* span-processing threads which could run in parallel.
*/
-struct sw_span {
+typedef struct sw_span {
GLint x, y;
/** Only need to process pixels between start <= i < end */
* a lot of memory. The span_arrays struct is about 400KB while the
* sw_span struct is only about 512 bytes.
*/
- struct span_arrays *array;
-};
+ SWspanarrays *array;
+} SWspan;
+
#define INIT_SPAN(S, PRIMITIVE, END, INTERP_MASK, ARRAY_MASK) \
/**
* \struct SWcontext
- * \brief SWContext?
+ * \brief Per-context state that's private to the software rasterizer module.
*/
typedef struct
{
* this object is big and causes problems when allocated on the stack
* on some systems.
*/
- struct span_arrays *SpanArrays;
+ SWspanarrays *SpanArrays;
/**
* Used to buffer N GL_POINTS, instead of rendering one by one.
*/
- struct sw_span PointSpan;
+ SWspan PointSpan;
/** Internal hooks, kept up to date by the same mechanism as above.
*/
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
const GLuint transferOps = ctx->_ImageTransferState;
GLfloat *dest, *tmpImage, *convImage;
- struct sw_span span;
+ SWspan span;
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA);
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
GLint overlapping;
const GLuint transferOps = ctx->_ImageTransferState;
- struct sw_span span;
+ SWspan span;
if (!ctx->ReadBuffer->_ColorReadBuffer) {
/* no readbuffer - OK */
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
const GLboolean shift_or_offset = ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset;
GLint overlapping;
- struct sw_span span;
+ SWspan span;
if (!ctx->ReadBuffer->_ColorReadBuffer) {
/* no readbuffer - OK */
GLint j;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
GLint overlapping;
- struct sw_span span;
+ SWspan span;
if (!readRb) {
/* no readbuffer - OK */
* Apply depth test to span of fragments.
*/
static GLuint
-depth_test_span( GLcontext *ctx, struct sw_span *span)
+depth_test_span( GLcontext *ctx, SWspan *span)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_DepthBuffer;
static GLuint
-depth_test_pixels( GLcontext *ctx, struct sw_span *span )
+depth_test_pixels( GLcontext *ctx, SWspan *span )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_DepthBuffer;
* \return approx number of pixels that passed (only zero is reliable)
*/
GLuint
-_swrast_depth_test_span( GLcontext *ctx, struct sw_span *span)
+_swrast_depth_test_span( GLcontext *ctx, SWspan *span)
{
if (span->arrayMask & SPAN_XY)
return depth_test_pixels(ctx, span);
* \return GL_TRUE if any fragments pass, GL_FALSE if no fragments pass
*/
GLboolean
-_swrast_depth_bounds_test( GLcontext *ctx, struct sw_span *span )
+_swrast_depth_bounds_test( GLcontext *ctx, SWspan *span )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_DepthBuffer;
extern GLuint
-_swrast_depth_test_span( GLcontext *ctx, struct sw_span *span);
+_swrast_depth_test_span( GLcontext *ctx, SWspan *span);
extern GLboolean
-_swrast_depth_bounds_test( GLcontext *ctx, struct sw_span *span );
+_swrast_depth_bounds_test( GLcontext *ctx, SWspan *span );
extern void
const GLint imgX = x, imgY = y;
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- struct sw_span span;
+ SWspan span;
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA);
const GLint imgX = x, imgY = y;
const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0;
GLint row, skipPixels;
- struct sw_span span;
+ SWspan span;
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_INDEX);
const GLboolean scaleOrBias
= ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0;
- struct sw_span span;
+ SWspan span;
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_Z);
GLboolean quickDraw;
GLfloat *convImage = NULL;
GLuint transferOps = ctx->_ImageTransferState;
- struct sw_span span;
+ SWspan span;
INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA);
* _PreferPixelFog should be in sync with that state!
*/
void
-_swrast_fog_rgba_span( const GLcontext *ctx, struct sw_span *span )
+_swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span )
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat rFog = ctx->Fog.Color[RCOMP] * CHAN_MAX;
* As above, but color index mode.
*/
void
-_swrast_fog_ci_span( const GLcontext *ctx, struct sw_span *span )
+_swrast_fog_ci_span( const GLcontext *ctx, SWspan *span )
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLuint haveW = (span->interpMask & SPAN_W);
_swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z);
extern void
-_swrast_fog_rgba_span( const GLcontext *ctx, struct sw_span *span );
+_swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span );
extern void
-_swrast_fog_ci_span( const GLcontext *ctx, struct sw_span *span );
+_swrast_fog_ci_span( const GLcontext *ctx, SWspan *span );
#endif
* To draw a wide line we can simply redraw the span N times, side by side.
*/
static void
-draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor )
+draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
{
GLint width, start;
static void
NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
{
- struct sw_span span;
+ SWspan span;
GLuint interpFlags = 0;
GLint x0 = (GLint) vert0->win[0];
GLint x1 = (GLint) vert1->win[0];
*/
void
_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span)
+ SWspan *span)
{
GLuint dest[MAX_WIDTH];
GLuint *index = span->array->index;
*/
void
_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span)
+ SWspan *span)
{
void *rbPixels;
extern void
_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span);
+ SWspan *span);
extern void
_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span);
+ SWspan *span);
#endif
*/
void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span)
+ SWspan *span)
{
const GLuint n = span->end;
void *rbPixels;
*/
void
_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span)
+ SWspan *span)
{
const GLuint srcMask = ctx->Color.IndexMask;
const GLuint dstMask = ~srcMask;
extern void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span);
+ SWspan *span);
extern void
_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span);
+ SWspan *span);
#endif
static GLboolean
fetch_vector4_deriv( GLcontext *ctx,
const struct prog_src_register *source,
- const struct sw_span *span,
+ const SWspan *span,
char xOrY, GLint column, GLfloat result[4] )
{
GLfloat src[4];
init_machine_deriv( GLcontext *ctx,
const struct fp_machine *machine,
const struct gl_fragment_program *program,
- const struct sw_span *span, char xOrY,
+ const SWspan *span, char xOrY,
struct fp_machine *dMachine )
{
GLuint u;
static GLboolean
execute_program( GLcontext *ctx,
const struct gl_fragment_program *program, GLuint maxInst,
- struct fp_machine *machine, const struct sw_span *span,
+ struct fp_machine *machine, const SWspan *span,
GLuint column )
{
GLuint pc;
static void
init_machine( GLcontext *ctx, struct fp_machine *machine,
const struct gl_fragment_program *program,
- const struct sw_span *span, GLuint col )
+ const SWspan *span, GLuint col )
{
GLuint inputsRead = program->Base.InputsRead;
GLuint u;
* Execute the current fragment program, operating on the given span.
*/
void
-_swrast_exec_fragment_program( GLcontext *ctx, struct sw_span *span )
+_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span )
{
const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
GLuint i;
extern void
-_swrast_exec_fragment_program( GLcontext *ctx, struct sw_span *span );
+_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span );
#endif
GLuint u;
#endif
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- struct sw_span *span = &(swrast->PointSpan);
+ SWspan *span = &(swrast->PointSpan);
/* Cull primitives with malformed coordinates.
*/
* Used during setup for glDraw/CopyPixels.
*/
void
-_swrast_span_default_z( GLcontext *ctx, struct sw_span *span )
+_swrast_span_default_z( GLcontext *ctx, SWspan *span )
{
const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF;
if (ctx->DrawBuffer->Visual.depthBits <= 16)
* Used during setup for glDraw/CopyPixels.
*/
void
-_swrast_span_default_fog( GLcontext *ctx, struct sw_span *span )
+_swrast_span_default_fog( GLcontext *ctx, SWspan *span )
{
span->fog = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance);
span->fogStep = span->dfogdx = span->dfogdy = 0.0F;
* Used during setup for glDraw/CopyPixels.
*/
void
-_swrast_span_default_color( GLcontext *ctx, struct sw_span *span )
+_swrast_span_default_color( GLcontext *ctx, SWspan *span )
{
if (ctx->Visual.rgbMode) {
GLchan r, g, b, a;
* Used during setup for glDraw/CopyPixels.
*/
void
-_swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span )
+_swrast_span_default_texcoords( GLcontext *ctx, SWspan *span )
{
GLuint i;
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
* \param specular if true, interpolate specular, else interpolate rgba.
*/
static void
-interpolate_colors(GLcontext *ctx, struct sw_span *span, GLboolean specular)
+interpolate_colors(GLcontext *ctx, SWspan *span, GLboolean specular)
{
const GLuint n = span->end;
GLuint i;
/* Fill in the span.color.index array from the interpolation values */
static void
-interpolate_indexes(GLcontext *ctx, struct sw_span *span)
+interpolate_indexes(GLcontext *ctx, SWspan *span)
{
GLfixed index = span->index;
const GLint indexStep = span->indexStep;
/* Fill in the span.array.fog values from the interpolation values */
static void
-interpolate_fog(const GLcontext *ctx, struct sw_span *span)
+interpolate_fog(const GLcontext *ctx, SWspan *span)
{
GLfloat *fog = span->array->fog;
const GLfloat fogStep = span->fogStep;
/* Fill in the span.zArray array from the interpolation values */
void
-_swrast_span_interpolate_z( const GLcontext *ctx, struct sw_span *span )
+_swrast_span_interpolate_z( const GLcontext *ctx, SWspan *span )
{
const GLuint n = span->end;
GLuint i;
* or user-written code.
*/
static void
-interpolate_texcoords(GLcontext *ctx, struct sw_span *span)
+interpolate_texcoords(GLcontext *ctx, SWspan *span)
{
ASSERT(span->interpMask & SPAN_TEXTURE);
ASSERT(!(span->arrayMask & SPAN_TEXTURE));
* Fill in the span.varying array from the interpolation values.
*/
static void
-interpolate_varying(GLcontext *ctx, struct sw_span *span)
+interpolate_varying(GLcontext *ctx, SWspan *span)
{
GLuint i, j;
* Apply the current polygon stipple pattern to a span of pixels.
*/
static void
-stipple_polygon_span( GLcontext *ctx, struct sw_span *span )
+stipple_polygon_span( GLcontext *ctx, SWspan *span )
{
const GLuint highbit = 0x80000000;
const GLuint stipple = ctx->PolygonStipple[span->y % 32];
* GL_FALSE nothing visible
*/
static GLuint
-clip_span( GLcontext *ctx, struct sw_span *span )
+clip_span( GLcontext *ctx, SWspan *span )
{
const GLint xmin = ctx->DrawBuffer->_Xmin;
const GLint xmax = ctx->DrawBuffer->_Xmax;
* to their original values before returning.
*/
void
-_swrast_write_index_span( GLcontext *ctx, struct sw_span *span)
+_swrast_write_index_span( GLcontext *ctx, SWspan *span)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLbitfield origInterpMask = span->interpMask;
* GL_LIGHT_MODEL_COLOR_CONTROL = GL_SEPARATE_SPECULAR_COLOR.
*/
static void
-add_specular(GLcontext *ctx, struct sw_span *span)
+add_specular(GLcontext *ctx, SWspan *span)
{
switch (span->array->ChanType) {
case GL_UNSIGNED_BYTE:
* Convert the span's color arrays to the given type.
*/
static void
-convert_color_type(GLcontext *ctx, struct sw_span *span, GLenum newType)
+convert_color_type(GLcontext *ctx, SWspan *span, GLenum newType)
{
const GLubyte *mask = span->array->mask;
GLubyte (*rgba1)[4] = span->array->color.sz1.rgba;
* to their original values before returning.
*/
void
-_swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span)
+_swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
{
const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask);
SWcontext *swrast = SWRAST_CONTEXT(ctx);
*/
void *
_swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span)
+ SWspan *span)
{
GLuint pixelSize;
void *rbPixels;
extern void
-_swrast_span_default_z( GLcontext *ctx, struct sw_span *span );
+_swrast_span_default_z( GLcontext *ctx, SWspan *span );
extern void
-_swrast_span_interpolate_z( const GLcontext *ctx, struct sw_span *span );
+_swrast_span_interpolate_z( const GLcontext *ctx, SWspan *span );
extern void
-_swrast_span_default_fog( GLcontext *ctx, struct sw_span *span );
+_swrast_span_default_fog( GLcontext *ctx, SWspan *span );
extern void
-_swrast_span_default_color( GLcontext *ctx, struct sw_span *span );
+_swrast_span_default_color( GLcontext *ctx, SWspan *span );
extern void
-_swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span );
+_swrast_span_default_texcoords( GLcontext *ctx, SWspan *span );
extern GLfloat
_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
GLfloat s, GLfloat t, GLfloat q, GLfloat invQ);
extern void
-_swrast_write_index_span( GLcontext *ctx, struct sw_span *span);
+_swrast_write_index_span( GLcontext *ctx, SWspan *span);
extern void
-_swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span);
+_swrast_write_rgba_span( GLcontext *ctx, SWspan *span);
extern void
extern void *
_swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
- struct sw_span *span);
+ SWspan *span);
#endif
*
*/
static GLboolean
-stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span, GLuint face)
+stencil_and_ztest_span(GLcontext *ctx, SWspan *span, GLuint face)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_StencilBuffer;
* GL_TRUE - one or more fragments passed the testing
*/
static GLboolean
-stencil_and_ztest_pixels( GLcontext *ctx, struct sw_span *span, GLuint face )
+stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_StencilBuffer;
* GL_FALSE = all fragments failed.
*/
GLboolean
-_swrast_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span)
+_swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span)
{
/* span->facing can only be non-zero if using two-sided stencil */
ASSERT(ctx->Stencil._TestTwoSide || span->facing == 0);
extern GLboolean
-_swrast_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span);
+_swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span);
extern void
* Apply texture mapping to a span of fragments.
*/
void
-_swrast_texture_span( GLcontext *ctx, struct sw_span *span )
+_swrast_texture_span( GLcontext *ctx, SWspan *span )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan primary_rgba[MAX_WIDTH][4];
#include "swrast.h"
extern void
-_swrast_texture_span( GLcontext *ctx, struct sw_span *span );
+_swrast_texture_span( GLcontext *ctx, SWspan *span );
#endif
* texture env modes.
*/
static INLINE void
-affine_span(GLcontext *ctx, struct sw_span *span,
+affine_span(GLcontext *ctx, SWspan *span,
struct affine_info *info)
{
GLchan sample[4]; /* the filtered texture sample */
static INLINE void
-fast_persp_span(GLcontext *ctx, struct sw_span *span,
+fast_persp_span(GLcontext *ctx, SWspan *span,
struct persp_info *info)
{
GLchan sample[4]; /* the filtered texture sample */
#endif
GLinterp vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy;
- struct sw_span span;
+ SWspan span;
INIT_SPAN(span, GL_POLYGON, 0, 0, 0);
* index/depth_span().
*/
static void
-zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const struct sw_span *span,
+zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
const GLvoid *src, GLenum format )
{
- struct sw_span zoomed;
- struct span_arrays zoomed_arrays; /* this is big! */
+ SWspan zoomed;
+ SWspanarrays zoomed_arrays; /* this is big! */
GLint x0, x1, y0, y1;
GLint zoomedWidth;
void
_swrast_write_zoomed_rgba_span( GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span,
+ const SWspan *span,
CONST GLchan rgba[][4])
{
zoom_span(ctx, imgX, imgY, span, (const GLvoid *) rgba, GL_RGBA);
void
_swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span,
+ const SWspan *span,
CONST GLchan rgb[][3])
{
zoom_span(ctx, imgX, imgY, span, (const GLvoid *) rgb, GL_RGB);
void
_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span)
+ const SWspan *span)
{
zoom_span(ctx, imgX, imgY, span,
(const GLvoid *) span->array->index, GL_COLOR_INDEX);
void
_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span)
+ const SWspan *span)
{
zoom_span(ctx, imgX, imgY, span,
(const GLvoid *) span->array->z, GL_DEPTH_COMPONENT);
extern void
_swrast_write_zoomed_rgba_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span,
+ const SWspan *span,
CONST GLchan rgb[][4]);
extern void
_swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span,
+ const SWspan *span,
CONST GLchan rgb[][3]);
extern void
_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span);
+ const SWspan *span);
extern void
_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const struct sw_span *span);
+ const SWspan *span);
extern void