mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
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.
This commit is contained in:
parent
038bd400e2
commit
ce526de6ff
1 changed files with 2 additions and 2 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue