From: Pi Tabred Date: Sat, 14 Dec 2013 17:32:00 +0000 (-0700) Subject: mesa: Make validate_texbuffer_format function available externally X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5e6fe4d29fcada5f6f75eaff3160aa6ed4a46e3;p=mesa.git mesa: Make validate_texbuffer_format function available externally - change storage class from static to extern - rename validate_texbuffer_format to _mesa_validate_texbuffer_format Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index f9427dcc45f..0d436b2fb21 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -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); diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 792383d2fe0..0b5786340b7 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(). */