summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-18 10:13:44 -0600
committerBrian Paul <[email protected]>2009-05-18 10:13:44 -0600
commit30320f0afb3ae4409adab662d65475cf9665bc19 (patch)
treecd3068eb4cb480edbbb0153760fb339d91990aae
parent14e5bff97b20565637d468d97dba434ac4cd2ba1 (diff)
softpipe: add texture target sanity check assertion
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c5
1 files changed, 5 insertions, 0 deletions
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: