OSDN Git Service

mesa unpack: call _mesa_problem when unpack function is not available
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 10 Jul 2012 18:07:54 +0000 (11:07 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 15 Aug 2012 00:07:42 +0000 (17:07 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/format_unpack.c

index 529c416..bd21852 100644 (file)
@@ -1604,6 +1604,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];
 }