Mesa (mesa_7_5_branch): softpipe: add texture target sanity check assertion

Brian Paul brianp at kemper.freedesktop.org
Mon May 18 16:13:56 UTC 2009


Module: Mesa
Branch: mesa_7_5_branch
Commit: 30320f0afb3ae4409adab662d65475cf9665bc19
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=30320f0afb3ae4409adab662d65475cf9665bc19

Author: Brian Paul <brianp at vmware.com>
Date:   Mon May 18 10:13:44 2009 -0600

softpipe: add texture target sanity check assertion

---

 src/gallium/drivers/softpipe/sp_screen.c |    5 +++++
 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 7380a6a..a32fd3a 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:




More information about the mesa-commit mailing list