mesa: plug in GL_ARB_draw_buffers_blend functions
[mesa.git] / src / mesa / main / teximage.c
index c5ae63052a740e12bf7ea2659805fd29fcd03206..47d509396a788857a4e2a4d3416b4053cb4229fb 100644 (file)
@@ -40,6 +40,7 @@
 #include "image.h"
 #include "imports.h"
 #include "macros.h"
+#include "mfeatures.h"
 #include "state.h"
 #include "texcompress.h"
 #include "texfetch.h"
@@ -340,11 +341,11 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
          return GL_RGBA;
       case GL_SLUMINANCE_ALPHA_EXT:
       case GL_SLUMINANCE8_ALPHA8_EXT:
-      case GL_COMPRESSED_SLUMINANCE_EXT:
       case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
          return GL_LUMINANCE_ALPHA;
       case GL_SLUMINANCE_EXT:
       case GL_SLUMINANCE8_EXT:
+      case GL_COMPRESSED_SLUMINANCE_EXT:
          return GL_LUMINANCE;
       default:
          ; /* fallthrough */
@@ -931,8 +932,8 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
 /**
  * Return number of dimensions per mipmap level for the given texture target.
  */
-static GLint
-get_texture_dimensions(GLenum target)
+GLint
+_mesa_get_texture_dimensions(GLenum target)
 {
    switch (target) {
    case GL_TEXTURE_1D:
@@ -1157,7 +1158,7 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
 
    img->TexFormat = format;
 
-   dims = get_texture_dimensions(target);
+   dims = _mesa_get_texture_dimensions(target);
 
    _mesa_set_fetch_functions(img, dims);
 }