gallium: added a texture format sanity check/assertion in st_texture_create()
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 28 Feb 2008 18:17:30 +0000 (11:17 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 28 Feb 2008 18:36:54 +0000 (11:36 -0700)
make sure the tex format is actually supported by the driver.

src/mesa/state_tracker/st_texture.c

index c2b0aa8..cbc6f84 100644 (file)
@@ -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;