mesa: add missing texture strings in tex_target_name()
authorBrian Paul <brianp@vmware.com>
Sun, 9 Jun 2013 16:13:00 +0000 (09:13 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 10 Jun 2013 22:35:35 +0000 (16:35 -0600)
And add a static assert for the future.

src/mesa/main/debug.c

index 8c3f783086117cc152c130a9ba2201f3699ecbfd..9434c1ea2dd97628b4d45c80d261566902876daf 100644 (file)
@@ -51,9 +51,14 @@ tex_target_name(GLenum tgt)
       { GL_TEXTURE_RECTANGLE, "GL_TEXTURE_RECTANGLE" },
       { GL_TEXTURE_1D_ARRAY_EXT, "GL_TEXTURE_1D_ARRAY" },
       { GL_TEXTURE_2D_ARRAY_EXT, "GL_TEXTURE_2D_ARRAY" },
+      { GL_TEXTURE_CUBE_MAP_ARRAY, "GL_TEXTURE_CUBE_MAP_ARRAY" },
+      { GL_TEXTURE_BUFFER, "GL_TEXTURE_BUFFER" },
+      { GL_TEXTURE_2D_MULTISAMPLE, "GL_TEXTURE_2D_MULTISAMPLE" },
+      { GL_TEXTURE_2D_MULTISAMPLE_ARRAY, "GL_TEXTURE_2D_MULTISAMPLE_ARRAY" },
       { GL_TEXTURE_EXTERNAL_OES, "GL_TEXTURE_EXTERNAL_OES" }
    };
    GLuint i;
+   STATIC_ASSERT(Elements(tex_targets) == NUM_TEXTURE_TARGETS);
    for (i = 0; i < Elements(tex_targets); i++) {
       if (tex_targets[i].target == tgt)
          return tex_targets[i].name;