Mesa (master): mesa: use _mesa_clear_texture_image() in clear_texture_fields()

Brian Paul brianp at kemper.freedesktop.org
Fri Jul 15 20:38:02 UTC 2016


Module: Mesa
Branch: master
Commit: e477d92c94d6415d2844f68766adf5339aebe7bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e477d92c94d6415d2844f68766adf5339aebe7bf

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jul 13 13:52:31 2016 -0600

mesa: use _mesa_clear_texture_image() in clear_texture_fields()

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 at lists.freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>

---

 src/mesa/main/texstorage.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index f4a0760..72ed869 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -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);
       }
    }
 }




More information about the mesa-commit mailing list