mesa: Set new renderbuffers to RGBA4 on all GLES contexts.
authorEric Anholt <eric@anholt.net>
Mon, 1 May 2017 17:21:36 +0000 (10:21 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 10 Oct 2017 16:31:29 +0000 (09:31 -0700)
Before we were doing RGBA4 on GLES3 only, but as of GLES2 2.0.22 it should
be RGBA4 as well.  Fixes DEQP
functional.state_query.rbo.renderbuffer_internal_format.

Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/renderbuffer.c

index 5046f9d5f4227bf2da64e4db1f604b1d0d44584f..925001a76a38995ec2d48d056dd45b714db297c1 100644 (file)
@@ -66,7 +66,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
     * specs. If the context is not current, we cannot determine the
     * API, so default to GL_RGBA.
     */
-   if (ctx && _mesa_is_gles3(ctx)) {
+   if (ctx && _mesa_is_gles(ctx)) {
       rb->InternalFormat = GL_RGBA4;
    } else {
       rb->InternalFormat = GL_RGBA;