Bug 88079 - dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0 tests fail due to enabling of GL_RGB and GL_RGBA
Summary: dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0 tests f...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-06 02:02 UTC by Mike Mason
Modified: 2015-01-13 23:45 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mike Mason 2015-01-06 02:02:47 UTC
Environment:
Mesa: (master 934e41c0b31cffa4efc08f61cff2389e3149b3f3)
Ubuntu 14.04


The following dEQP tests fail due to a recent commit that enables GL_RGB and GL_RGBA internal formats for render buffers:

dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_byte
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_short_5_6_5
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_int_2_10_10_10_rev
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_int_10f_11f_11f_rev
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba_unsigned_byte
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba_unsigned_short_4_4_4_4
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba_unsigned_short_5_5_5_1
dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgba_unsigned_int_2_10_10_10_rev


Output:

# ./deqp-gles3 --deqp-case=dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_byte
dEQP Core 2014.x (0xcafebabe) starting..
  target implementation = 'X11 EGL'

Test case 'dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_byte'..
  Fail (Framebuffer checked as complete, expected incomplete)
Test case duration in microseconds = 2719 us

DONE!

Test run totals:
  Passed:        0/1 (0.0%)
  Failed:        1/1 (100.0%)
  Not supported: 0/1 (0.0%)
  Warnings:      0/1 (0.0%)

All the above mentioned tests fail in the same way.


Analysis:

Bisect shows 78942787170615c9333810cf3a4819a13c9eb8e8 is the first bad commit

commit 78942787170615c9333810cf3a4819a13c9eb8e8
Author:     Eduardo Lima Mitev <elima@igalia.com>
AuthorDate: Thu Nov 20 14:02:46 2014 +0100
Commit:     Iago Toral Quiroga <itoral@igalia.com>
CommitDate: Tue Dec 9 11:40:00 2014 +0100

    mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0

    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

    Reviewed-by: Brian Paul <brianp@vmware.com>

This commit fixes tests where glGetInternalformativ() is used to get the number of samples supported by a particular internal format for a render buffer.  Pg 242 of the GLES 3.0.4 spec implies that GL_RGB and GL_RGBA are valid inputs to glGetInternalformativ().  However, these are unsized internal formats and are not supported for render buffers according to pg 204 of the spec, which states a renderbuffer's internal format "must be a sized internal format...".

The commit updates _mesa_base_fbo_format() to allow GL_RGB and GL_RGBA as valid render buffer internal formats.  It has the effect of enabling those formats for glGetInternalformativ() and glRenderBufferStorage()/glRenderBufferStorageMultisample().  It should have only enabled the formats for glGetInternalformativ().


Steps to reproduce:

# ./deqp-gles3 --deqp-case=dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.color0.rgb_unsigned_byte
Comment 1 Eduardo Lima Mitev 2015-01-09 15:55:10 UTC
Sent a patch for review: http://lists.freedesktop.org/archives/mesa-dev/2015-January/074122.html.

It just allows GL_RGB and GL_RGBA when querying state through glGetInternalformativ(). It now passes the regressed dEQP tests as well as those in the original patch.

Thanks a lot for the extensive bug description, it was very helpful.
Comment 2 Mike Mason 2015-01-09 23:52:02 UTC
I submitted a similar patch for review yesterday:

http://lists.freedesktop.org/archives/mesa-dev/2015-January/074092.html

then submitted v2 today after Matt Turner's review:

http://lists.freedesktop.org/archives/mesa-dev/2015-January/074134.html
Comment 3 Eduardo Lima Mitev 2015-01-12 08:16:26 UTC
Oh, missed it, sorry. I withdrew my patch. Thank you!
Comment 4 Chad Versace 2015-01-13 23:45:57 UTC
I committed Mike's patch v3 today. Closing bug as fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.