mesa: use _mesa_clear_texture_image() in clear_texture_fields()
authorBrian Paul <brianp@vmware.com>
Wed, 13 Jul 2016 19:52:31 +0000 (13:52 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 15 Jul 2016 20:24:34 +0000 (14:24 -0600)
This avoids a failed assert(img->_BaseFormat != -1) in
init_teximage_fields_ms() because the internalFormat argument is GL_NONE.
This was hit when using glTexStorage() to do a proxy texture test.

Fixes a failure with the updated Piglit tex3d-maxsize test.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/texstorage.c

index f4a076028fbcb58a4323bf51b5624349344607b7..72ed8696fde29a2eb9d280035cf0a362cc3888d1 100644 (file)
@@ -179,9 +179,7 @@ clear_texture_fields(struct gl_context *ctx,
             return;
         }
 
-         _mesa_init_teximage_fields(ctx, texImage,
-                                    0, 0, 0, 0, /* w, h, d, border */
-                                    GL_NONE, MESA_FORMAT_NONE);
+         _mesa_clear_texture_image(ctx, texImage);
       }
    }
 }