From 30320f0afb3ae4409adab662d65475cf9665bc19 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 18 May 2009 10:13:44 -0600 Subject: [PATCH] softpipe: add texture target sanity check assertion --- src/gallium/drivers/softpipe/sp_screen.c | 5 +++++ 1 file changed, 5 insertions(+) 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: -- 2.30.2