mesa: Make validate_texbuffer_format function available externally
authorPi Tabred <servuswiegehtz@yahoo.de>
Sat, 14 Dec 2013 17:32:00 +0000 (10:32 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Dec 2013 16:06:51 +0000 (09:06 -0700)
 - change storage class from static to extern
 - rename validate_texbuffer_format to _mesa_validate_texbuffer_format

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c
src/mesa/main/teximage.h

index f9427dcc45f28aa6013061a11a00aa8feae2a850..0d436b2fb219094040b899f55180dfbaa729f4e0 100644 (file)
@@ -4037,8 +4037,9 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
 }
 
 
-static gl_format
-validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
+gl_format
+_mesa_validate_texbuffer_format(const struct gl_context *ctx,
+                                GLenum internalFormat)
 {
    gl_format format = get_texbuffer_format(ctx, internalFormat);
    GLenum datatype;
@@ -4088,7 +4089,7 @@ texbufferrange(struct gl_context *ctx, GLenum target, GLenum internalFormat,
       return;
    }
 
-   format = validate_texbuffer_format(ctx, internalFormat);
+   format = _mesa_validate_texbuffer_format(ctx, internalFormat);
    if (format == MESA_FORMAT_NONE) {
       _mesa_error(ctx, GL_INVALID_ENUM, "glTexBuffer(internalFormat 0x%x)",
                   internalFormat);
index 792383d2fe0303605e9943e9fbf37f726d9007ba..0b5786340b76b6974bc73f65be23b082e79f16c4 100644 (file)
@@ -147,6 +147,10 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target,
                                GLint level, GLint width, GLint height,
                                GLint depth, GLint border);
 
+extern gl_format
+_mesa_validate_texbuffer_format(const struct gl_context *ctx,
+                                GLenum internalFormat);
+
 /**
  * Lock a texture for updating.  See also _mesa_lock_context_textures().
  */