From: Brian Paul Date: Mon, 18 May 2009 16:13:44 +0000 (-0600) Subject: softpipe: add texture target sanity check assertion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30320f0afb3ae4409adab662d65475cf9665bc19;p=mesa.git softpipe: add texture target sanity check assertion --- diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 7380a6ae2be..a32fd3a1ba0 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -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: