softpipe: add texture target sanity check assertion
authorBrian Paul <brianp@vmware.com>
Mon, 18 May 2009 16:13:44 +0000 (10:13 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 18 May 2009 16:13:44 +0000 (10:13 -0600)
src/gallium/drivers/softpipe/sp_screen.c

index 7380a6ae2be9010469d01f82511272ca7e2e015c..a32fd3a1ba0d46624a102b1a6693daa831ab6e81 100644 (file)
@@ -127,6 +127,11 @@ softpipe_is_format_supported( struct pipe_screen *screen,
                               unsigned tex_usage, 
                               unsigned geom_flags )
 {
+   assert(target == PIPE_TEXTURE_1D ||
+          target == PIPE_TEXTURE_2D ||
+          target == PIPE_TEXTURE_3D ||
+          target == PIPE_TEXTURE_CUBE);
+
    switch(format) {
    case PIPE_FORMAT_DXT1_RGB:
    case PIPE_FORMAT_DXT1_RGBA: