[Mesa-dev] [RFC 51/63] mesa/textureview: Make _lookup_view_class public
Eduardo Lima Mitev
elima at igalia.com
Tue Jan 19 08:42:31 PST 2016
From: Antia Puentes <apuentes at igalia.com>
It will be used by the ARB_internalformat_query2 implementation to
implement the VIEW_COMPATIBILITY_CLASS <pname> query.
---
src/mesa/main/textureview.c | 12 ++++--------
src/mesa/main/textureview.h | 8 ++++++++
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/mesa/main/textureview.c b/src/mesa/main/textureview.c
index 04b7d73..2bc9ce1 100644
--- a/src/mesa/main/textureview.c
+++ b/src/mesa/main/textureview.c
@@ -162,12 +162,8 @@ static const struct internal_format_class_info s3tc_compatible_internal_formats[
{GL_VIEW_CLASS_S3TC_DXT5_RGBA, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT},
};
-/**
- * Lookup format view class based on internalformat
- * \return VIEW_CLASS if internalformat found in table, false otherwise.
- */
-static GLenum
-lookup_view_class(const struct gl_context *ctx, GLenum internalformat)
+GLenum
+_mesa_texture_view_lookup_view_class(const struct gl_context *ctx, GLenum internalformat)
{
GLuint i;
@@ -339,8 +335,8 @@ _mesa_texture_view_compatible_format(const struct gl_context *ctx,
if (origInternalFormat == newInternalFormat)
return true;
- origViewClass = lookup_view_class(ctx, origInternalFormat);
- newViewClass = lookup_view_class(ctx, newInternalFormat);
+ origViewClass = _mesa_texture_view_lookup_view_class(ctx, origInternalFormat);
+ newViewClass = _mesa_texture_view_lookup_view_class(ctx, newInternalFormat);
if ((origViewClass == newViewClass) && origViewClass != false)
return true;
diff --git a/src/mesa/main/textureview.h b/src/mesa/main/textureview.h
index 59e24b6..39b415d 100644
--- a/src/mesa/main/textureview.h
+++ b/src/mesa/main/textureview.h
@@ -34,6 +34,14 @@ _mesa_texture_view_compatible_format(const struct gl_context *ctx,
GLenum origInternalFormat,
GLenum newInternalFormat);
+/**
+ * Lookup format view class based on internalformat
+ * \return VIEW_CLASS if internalformat found in table, false otherwise.
+ */
+GLenum
+_mesa_texture_view_lookup_view_class(const struct gl_context *ctx,
+ GLenum internalformat);
+
extern void GLAPIENTRY
_mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
GLenum internalformat,
--
2.5.3
More information about the mesa-dev
mailing list