[Mesa-dev] [PATCH V2 02/10] mesa: Make validate_texbuffer_format function available externally

Pi Tabred servuswiegehtz at yahoo.de
Wed Dec 11 13:55:26 PST 2013


 - change storage class from static to extern
 - rename validate_texbuffer_format to _mesa_validate_texbuffer_format
---
 src/mesa/main/teximage.c | 7 ++++---
 src/mesa/main/teximage.h | 4 ++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 7ec3e20..21dcef5 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4036,8 +4036,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;
@@ -4087,7 +4088,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);
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 792383d..0b57863 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -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().
  */
-- 
1.8.3.1



More information about the mesa-dev mailing list