summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_masking.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_masking.c')
-rw-r--r--src/mesa/swrast/s_masking.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c
index 0f2bde1b0a..f83e305b06 100644
--- a/src/mesa/swrast/s_masking.c
+++ b/src/mesa/swrast/s_masking.c
@@ -38,17 +38,16 @@
/**
* 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];
@@ -76,10 +75,10 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
}
#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
}
@@ -87,14 +86,14 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
/**
* 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;