[Mesa-dev] [PATCH v2 03/12] mesa unpack: use _mesa_problem rather than assert

Jordan Justen jordan.l.justen at intel.com
Wed Jul 11 14:58:49 PDT 2012


If the unpack functions is not available, use _mesa_problem
rather than asserting.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/main/format_unpack.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index c42bac1..66b6471 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -1589,6 +1589,11 @@ get_unpack_rgba_function(gl_format format)
       initialized = GL_TRUE;
    }
 
+   if (table[format] == NULL) {
+      _mesa_problem(NULL, "unsupported unpack for format %s",
+                    _mesa_get_format_name(format));
+   }
+
    return table[format];
 }
 
-- 
1.7.9.5



More information about the mesa-dev mailing list