mesa/teximage: make public is_renderable_texture_format
authorAntia Puentes <apuentes@igalia.com>
Wed, 4 Nov 2015 15:51:01 +0000 (16:51 +0100)
committerEduardo Lima Mitev <elima@igalia.com>
Thu, 3 Mar 2016 14:14:06 +0000 (15:14 +0100)
It will be used by the ARB_internalformat_query2 implementation
to check if the 'internalformat' passed is supported by texture
MULTISAMPLE 'targets'.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/teximage.c
src/mesa/main/teximage.h

index 8a4c6286cbe7530802d17796a30ff75560cfc70a..3f8e2a6dd4d2c68ac37de190ba93b2b99f01a322 100644 (file)
@@ -5148,8 +5148,8 @@ _mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
                               bufObj, offset, size, "glTextureBufferRange");
 }
 
-static GLboolean
-is_renderable_texture_format(struct gl_context *ctx, GLenum internalformat)
+GLboolean
+_mesa_is_renderable_texture_format(struct gl_context *ctx, GLenum internalformat)
 {
    /* Everything that is allowed for renderbuffers,
     * except for a base format of GL_STENCIL_INDEX, unless supported.
@@ -5229,7 +5229,7 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
       return;
    }
 
-   if (!is_renderable_texture_format(ctx, internalformat)) {
+   if (!_mesa_is_renderable_texture_format(ctx, internalformat)) {
       /* Page 172 of OpenGL ES 3.1 spec says:
        *   "An INVALID_ENUM error is generated if sizedinternalformat is not
        *   color-renderable, depth-renderable, or stencil-renderable (as
index 17f2c908ecc606931103af54a4dd7766ed4b1eca..b3829aa56a5d5a64b4b505e365331cb049a58508 100644 (file)
@@ -214,6 +214,9 @@ _mesa_legal_texture_base_format_for_target(struct gl_context *ctx,
                                            unsigned dimensions,
                                            const char *caller);
 
+GLboolean
+_mesa_is_renderable_texture_format(struct gl_context *ctx, GLenum internalformat);
+
 extern void
 _mesa_texture_sub_image(struct gl_context *ctx, GLuint dims,
                         struct gl_texture_object *texObj,