mesa: added MESA_FORMAT_NONE
authorBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 00:53:22 +0000 (18:53 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 00:53:22 +0000 (18:53 -0600)
src/mesa/main/formats.c
src/mesa/main/formats.h

index 8aa0d107b7904979e64565d08762b42f5850a1c1..5c2bf5ece3e61748442763b33807fb7b369c0862 100644 (file)
  */
 static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
 {
+   {
+      MESA_FORMAT_NONE,            /* Name */
+      GL_NONE,                     /* BaseFormat */
+      GL_NONE,                     /* DataType */
+      0, 0, 0, 0,                  /* Red/Green/Blue/AlphaBits */
+      0, 0, 0, 0, 0,               /* Lum/Int/Index/Depth/StencilBits */
+      0, 0, 0                      /* BlockWidth/Height,Bytes */
+   },
    {
       MESA_FORMAT_RGBA8888,        /* Name */
       GL_RGBA,                     /* BaseFormat */
@@ -617,6 +625,9 @@ _mesa_test_formats(void)
 
       assert(info->Name == i);
 
+      if (info->Name == MESA_FORMAT_NONE)
+         continue;
+
       if (info->BlockWidth == 1 && info->BlockHeight == 1) {
          if (info->RedBits > 0) {
             GLuint t = info->RedBits + info->GreenBits
index 61bbd8e79aa030b320bc26bc93c52df0691743e8..e79991ad41009ae9c61504c4afe1b48b16ebe5bb 100644 (file)
@@ -42,6 +42,7 @@
  */
 typedef enum
 {
+   MESA_FORMAT_NONE = 0,
    /** 
     * \name Basic hardware formats
     */