Bug 69589 - [bisected] Piglit gl-3.2-draw-buffers-errors fails
Summary: [bisected] Piglit gl-3.2-draw-buffers-errors fails
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-09-19 19:45 UTC by Pavel Ondračka
Modified: 2015-10-27 11:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Pavel Ondračka 2013-09-19 19:45:57 UTC
Another older untracked piglit regression. Fails at least on i965 (GM45) and swrast, first bad commit: 

commit f3db20da1a04fd64732c62631d59aac801a1a59d
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Nov 16 14:52:01 2012 -0800

    mesa: Rework crazy error code rules in glDrawBuffers().
    
    Perhaps most importantly, this patch adds comments quoting the relevant
    spec paragraphs above each error condition.
    
    It also makes three changes:
    - For FBOs, GL_COLOR_ATTACHMENTm where m >= MaxDrawBuffers is supposed
      to generate INVALID_OPERATION (not INVALID_ENUM).
    - Constants that refer to multiple buffers (such as FRONT, BACK, LEFT,
      RIGHT, and FRONT_AND_BACK) are supposed to generate INVALID_OPERATION,
      not INVALID_ENUM.
    - In ES 3.0, for FBOs, buffers[i] must be NONE or GL_COLOR_ATTACHMENTi
      or else INVALID_OPERATION occurs.  (This is a new restriction.)
    
    Fixes es3conform's draw-buffers-api test.
    
    v2: The error path was missing a "return" like all the other error
    paths.  Also, we may as well call it glDrawBuffers in the error message
    since the ARB suffix doesn't exist in ES 3.
    
    Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

This wasn't probably spotted before, because at the time this was introduced, the failing piglit test wasn't written yet. However it showed up in my recent piglit comparison of last 5 mesa releases.

./bin/gl-3.2-draw-buffers-errors -auto -fbo
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(unsupported buffer)
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(unsupported buffer)
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(buffer)
Expected GL_INVALID_ENUM with GL_FRONT but received: GL_INVALID_OPERATION
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(buffer)
Expected GL_INVALID_ENUM with GL_BACK but received: GL_INVALID_OPERATION
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(buffer)
Expected GL_INVALID_ENUM with GL_LEFT but received: GL_INVALID_OPERATION
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(buffer)
Expected GL_INVALID_ENUM with GL_RIGHT but received: GL_INVALID_OPERATION
Mesa: User error: GL_INVALID_OPERATION in glDrawBuffersARB(buffer)
Expected GL_INVALID_ENUM with GL_FRONT_AND_BACK but received: GL_INVALID_OPERATION
PIGLIT: {'result': 'fail' }
Comment 1 Ian Romanick 2013-09-19 22:49:33 UTC
It seems that ES3 and desktop GL specify different errors.  Hurrah for convergence. :(

The text quoted by this test appears in both the 3.2 spec and the 3.1 spec.  I have posted patches to the piglit list that make this a 3.1 test.  That should get it wider visibility (since zero Mesa drivers currently support 3.2).
Comment 2 Tapani Pälli 2015-10-27 11:55:11 UTC
resolving old bug, test is called gl-3.1-draw-buffers-errors nowadays and it passes fine


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.