[Mesa-dev] [PATCH 02/10] mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0

Matt Turner mattst88 at gmail.com
Mon Dec 1 10:54:06 PST 2014


On Mon, Dec 1, 2014 at 5:04 AM, Eduardo Lima Mitev <elima at igalia.com> wrote:
> GL_RGB and GL_RGBA are valid internal formats on a GLES3 profile. See
> "Table 1. Unsized Internal Formats" at
> https://www.khronos.org/opengles/sdk/docs/man3/html/glTexImage2D.xhtml.
>
> Fixes 2 dEQP tests:
> - dEQP-GLES3.functional.state_query.internal_format.rgb_samples
> - dEQP-GLES3.functional.state_query.internal_format.rgba_samples
> ---
>  src/mesa/main/fbobject.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 19c4020..cce5370 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -1429,6 +1429,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
>     case GL_RGB8:
>        return GL_RGB;
>     case GL_RGB:
> +      if (_mesa_is_gles3(ctx))
> +         return GL_RGB;

/* fallthrough */

>     case GL_R3_G3_B2:
>     case GL_RGB4:
>     case GL_RGB5:
> @@ -1443,6 +1445,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
>     case GL_RGBA8:
>        return GL_RGBA;
>     case GL_RGBA:
> +      if (_mesa_is_gles3(ctx))
> +         return GL_RGBA;

/* fallthrough */


More information about the mesa-dev mailing list