diff options
author | Ian Romanick <idr@us.ibm.com> | 2006-11-13 22:51:11 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2006-11-13 22:51:11 +0000 |
commit | ce526de6ffea41d70f6efb6608ffe308028cb47b (patch) | |
tree | 0152cb08e4004259f2c5aa1cc8b68438e3a49e1a /src/mesa/drivers/dri/tdfx | |
parent | 038bd400e204bcfd9e0926b7e98122525d98f4d1 (diff) |
tdfxDDWriteDepthPixels can be called with mask == NULL.
Via depth_test_pixels (swrast/s_depth.c), tdfxDDWriteDepthPixels can
be called with mask == NULL. Test for this condition in the places
where mask might be dereference. This matches the behavior of several
other functions in this file with a 'const GLubyte mask[]' parameter.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_span.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c index ce895f8254..ee5eb459be 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -976,7 +976,7 @@ tdfxDDWriteDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb, GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, sizeof(GLushort)); for (i = 0; i < n; i++) { - if (mask[i] && visible_pixel(fxMesa, x[i], y[i])) { + if ((!mask || mask[i]) && visible_pixel(fxMesa, x[i], y[i])) { xpos = x[i] + fxMesa->x_offset; ypos = bottom - y[i]; d16 = depth[i]; @@ -1000,7 +1000,7 @@ tdfxDDWriteDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb, GetFbParams(fxMesa, &info, &backBufferInfo, &ReadParams, sizeof(GLuint)); for (i = 0; i < n; i++) { - if (mask[i]) { + if (!mask || mask[i]) { if (visible_pixel(fxMesa, x[i], y[i])) { xpos = x[i] + fxMesa->x_offset; ypos = bottom - y[i]; |