From: Brian Paul Date: Thu, 28 Feb 2008 18:17:30 +0000 (-0700) Subject: gallium: added a texture format sanity check/assertion in st_texture_create() X-Git-Tag: 062012170305~17580^2~390^2~2389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01e53be2b80d5bcb48102f7f1be507b6a5a5832a;p=profile%2Fivi%2Fmesa.git gallium: added a texture format sanity check/assertion in st_texture_create() make sure the tex format is actually supported by the driver. --- diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index c2b0aa8..cbc6f84 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -86,6 +86,7 @@ st_texture_create(struct st_context *st, _mesa_lookup_enum_by_nr(format), last_level); assert(format); + assert(screen->is_format_supported(screen, format, PIPE_TEXTURE)); memset(&pt, 0, sizeof(pt)); pt.target = target;