diff options
author | Brian Paul <[email protected]> | 2012-02-19 20:08:52 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-02-24 08:03:05 -0700 |
commit | 30ea34a8d9ad22be626c24aa660a80f2e08c1e24 (patch) | |
tree | 32c4fc3abbaf19cd0d674821d83091ed7936cf75 /src/mesa | |
parent | fb1650b202822adf37baa7e51878311bb83dc976 (diff) |
swrast: simplify mask array code
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index d1f622e2aa7..e89a999a934 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -201,6 +201,7 @@ _swrast_culltriangle( struct gl_context *ctx, #define RENDER_SPAN( span ) \ GLuint i; \ GLubyte (*rgba)[4] = swrast->SpanArrays->rgba8; \ + GLubyte *mask = swrast->SpanArrays->mask; \ span.intTex[0] -= FIXED_HALF; /* off-by-one error? */ \ span.intTex[1] -= FIXED_HALF; \ for (i = 0; i < span.end; i++) { \ @@ -215,17 +216,17 @@ _swrast_culltriangle( struct gl_context *ctx, rgba[i][BCOMP] = texture[pos+0]; \ rgba[i][ACOMP] = 0xff; \ zRow[i] = z; \ - span.array->mask[i] = 1; \ + mask[i] = 1; \ } \ else { \ - span.array->mask[i] = 0; \ + mask[i] = 0; \ } \ span.intTex[0] += span.intTexStep[0]; \ span.intTex[1] += span.intTexStep[1]; \ span.z += span.zStep; \ } \ _swrast_put_row(ctx, rb, GL_UNSIGNED_BYTE, \ - span.end, span.x, span.y, rgba, span.array->mask); + span.end, span.x, span.y, rgba, mask); #include "s_tritemp.h" |