sw_span object, rather than an explicit parameter.
for (buffer = 0; buffer < fb->_NumColorDrawBuffers[0]; buffer++) {
struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[0][buffer];
if (masking) {
- _swrast_mask_rgba_span(ctx, rb, &span, span.array->rgba);
+ _swrast_mask_rgba_span(ctx, rb, &span);
}
rb->PutRow(ctx, rb, width, xpos, ypos + i, span.array->rgba, NULL);
}
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
void
_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLchan rgba[][4])
+ struct sw_span *span)
{
GLchan framebuffer[MAX_WIDTH][4];
framebuffer);
}
- SWRAST_CONTEXT(ctx)->BlendFunc( ctx, span->end, span->array->mask, rgba,
+ SWRAST_CONTEXT(ctx)->BlendFunc( ctx, span->end, span->array->mask,
+ span->array->rgba,
(const GLchan (*)[4]) framebuffer );
}
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
extern void
_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLchan rgba[][4]);
+ struct sw_span *span);
extern void
for (i = 0; i < height; i++) {
span.x = x;
span.y = y + i;
- _swrast_mask_rgba_span(ctx, rb, &span, span.array->rgba);
+ _swrast_mask_rgba_span(ctx, rb, &span);
/* write masked row */
rb->PutRow(ctx, rb, width, x, y + i, span.array->rgba, NULL);
}
for (i = 0; i < height;i++) {
span.x = x;
span.y = y + i;
- _swrast_mask_ci_span(ctx, rb, &span, span.array->index);
+ _swrast_mask_ci_span(ctx, rb, &span);
/* write masked row */
rb->PutRow(ctx, rb, width, x, y + i, span.array->index, NULL);
}
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
void
_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLuint index[])
+ struct sw_span *span)
{
GLuint dest[MAX_WIDTH];
+ GLuint *index = span->array->index;
ASSERT(span->end < MAX_WIDTH);
ASSERT(rb->DataType == GL_UNSIGNED_INT);
*/
void
_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLchan rgba[][4])
+ struct sw_span *span)
{
GLchan dest[MAX_WIDTH][4];
/* XXX make this a runtime test */
#if CHAN_TYPE == GL_UNSIGNED_BYTE
/* treat 4*GLubyte as GLuint */
- logicop_uint(ctx, span->end, (GLuint *) rgba,
+ logicop_uint(ctx, span->end, (GLuint *) span->array->rgba,
(const GLuint *) dest, span->array->mask);
#elif CHAN_TYPE == GL_UNSIGNED_SHORT
- logicop_ushort(ctx, 4 * span->end, (GLushort *) rgba,
+ logicop_ushort(ctx, 4 * span->end, (GLushort *) span->array->rgba,
(const GLushort *) dest, span->array->mask);
#elif CHAN_TYPE == GL_FLOAT
- logicop_uint(ctx, 4 * span->end, (GLuint *) rgba,
+ logicop_uint(ctx, 4 * span->end, (GLuint *) span->array->rgba,
(const GLuint *) dest, span->array->mask);
#endif
(void) logicop_ubyte;
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.2
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
extern void
_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLuint index[]);
+ struct sw_span *span);
extern void
_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLchan rgba[][4]);
+ struct sw_span *span);
#endif
/**
* Apply the color mask to a span of rgba values.
- * \param rgba the array of incoming colors
*/
void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLchan rgba[][4])
+ struct sw_span *span)
{
GLchan dest[MAX_WIDTH][4];
#if CHAN_BITS == 8
GLuint srcMask = *((GLuint*)ctx->Color.ColorMask);
GLuint dstMask = ~srcMask;
- GLuint *rgba32 = (GLuint *) rgba;
+ GLuint *rgba32 = (GLuint *) span->array->rgba;
GLuint *dest32 = (GLuint *) dest;
#else
const GLboolean rMask = ctx->Color.ColorMask[RCOMP];
}
#else
for (i = 0; i < n; i++) {
- if (!rMask) rgba[i][RCOMP] = dest[i][RCOMP];
- if (!gMask) rgba[i][GCOMP] = dest[i][GCOMP];
- if (!bMask) rgba[i][BCOMP] = dest[i][BCOMP];
- if (!aMask) rgba[i][ACOMP] = dest[i][ACOMP];
+ if (!rMask) span->array->rgba[i][RCOMP] = dest[i][RCOMP];
+ if (!gMask) span->array->rgba[i][GCOMP] = dest[i][GCOMP];
+ if (!bMask) span->array->rgba[i][BCOMP] = dest[i][BCOMP];
+ if (!aMask) span->array->rgba[i][ACOMP] = dest[i][ACOMP];
}
#endif
}
/**
* Apply the index mask to a span of color index values.
- * \param index the array of incoming color indexes
*/
void
_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLuint index[])
+ struct sw_span *span)
{
const GLuint srcMask = ctx->Color.IndexMask;
const GLuint dstMask = ~srcMask;
+ GLuint *index = span->array->index;
GLuint dest[MAX_WIDTH];
GLuint i;
extern void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLchan rgba[][4]);
+ struct sw_span *span);
extern void
_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- const struct sw_span *span, GLuint index[]);
+ struct sw_span *span);
#endif
ASSERT(rb->_BaseFormat == GL_COLOR_INDEX);
if (ctx->Color.IndexLogicOpEnabled) {
- _swrast_logicop_ci_span(ctx, rb, span, span->array->index);
+ _swrast_logicop_ci_span(ctx, rb, span);
}
if (ctx->Color.IndexMask != 0xffffffff) {
- _swrast_mask_ci_span(ctx, rb, span, span->array->index);
+ _swrast_mask_ci_span(ctx, rb, span);
}
if ((span->interpMask & SPAN_INDEX) && span->indexStep == 0) {
ASSERT(rb->_BaseFormat == GL_RGBA);
if (ctx->Color._LogicOpEnabled) {
- _swrast_logicop_rgba_span(ctx, rb, span, span->array->rgba);
+ _swrast_logicop_rgba_span(ctx, rb, span);
}
else if (ctx->Color.BlendEnabled) {
- _swrast_blend_span(ctx, rb, span, span->array->rgba);
+ _swrast_blend_span(ctx, rb, span);
}
if (colorMask != 0xffffffff) {
- _swrast_mask_rgba_span(ctx, rb, span, span->array->rgba);
+ _swrast_mask_rgba_span(ctx, rb, span);
}
if (span->arrayMask & SPAN_XY) {