Bug 76832 - [i965] piglit fbo-drawbuffers-none glClearBuffer fails
Summary: [i965] piglit fbo-drawbuffers-none glClearBuffer fails
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-31 11:46 UTC by Iago Toral
Modified: 2014-04-16 06:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Iago Toral 2014-03-31 11:46:38 UTC
System description:

IvyBridge and Mesa from master (41f537afb37ed86dc51346f9fd412504c6a697f4)

Test output:

Testing glClearBuffer.
Probe color at (0,0)
  Expected: 0.000000 0.000000 1.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT3, COLOR_ATTACHMENT2, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 2 [details] [review],
  config (COLOR_ATTACHMENT3, COLOR_ATTACHMENT2, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT3, COLOR_ATTACHMENT2, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 0.000000 0.000000 1.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 0,
  config (NONE, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 1 [details] [review],
  config (NONE, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT1, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 0.000000 0.000000 1.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT1, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT1, COLOR_ATTACHMENT3, NONE, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT1, COLOR_ATTACHMENT3, NONE, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 0.000000 0.000000 1.000000 1.000000
  from color attachment 0,
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, COLOR_ATTACHMENT3, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.000000 0.000000 1.000000 1.000000
  from color attachment 2 [details] [review],
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, COLOR_ATTACHMENT3, NONE)
Probe color at (0,0)
  Expected: 0.000000 0.000000 1.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 3 [details] [review],
  config (NONE, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 0,
  config (NONE, COLOR_ATTACHMENT0, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 0.000000 1.000000 0.000000 1.000000
  Observed: 0.000000 0.000000 1.000000 1.000000
  from color attachment 2 [details] [review],
  config (NONE, COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 1.000000 1.000000 0.000000 1.000000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT3, NONE, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.000000 0.000000 1.000000 1.000000
  from color attachment 0,
  config (COLOR_ATTACHMENT0, NONE, COLOR_ATTACHMENT1, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.000000 1.000000 0.000000 1.000000
  from color attachment 2 [details] [review],
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, NONE, NONE)
PIGLIT: {'result': 'fail' }


Steps to reproduce:

1. From piglit root, execute:
./bin/fbo-drawbuffers-none glClearBuffer
Comment 1 Iago Toral 2014-03-31 11:48:19 UTC
The problem seems to be that we are clearing all enabled color buffers even if glClearBuffer specifies a single buffer to be cleared.

I'll provide a patch shortly.
Comment 2 Iago Toral 2014-03-31 12:20:59 UTC
Sent patch to the mailing list for review:
http://lists.freedesktop.org/archives/mesa-dev/2014-March/056846.html
Comment 3 Kenneth Graunke 2014-04-16 06:57:37 UTC
Fixed in master by:

commit a5957f7bc5e3618243f03cf9459394f9a83e5971
Author: Iago Toral Quiroga <itoral@igalia.com>
Date:   Mon Mar 31 14:17:08 2014 +0200

    i965: glClearBuffer() should only clear a single buffer.
    
    glClearBuffer() is currently clearing all active draw color buffers (all
    buffers that have not been set to GL_NONE when calling glDrawBuffers) instead
    of only clearing the one it receives as parameter. Altough brw_clear()
    receives a bit mask indicating the color buffers that should be cleared,
    this mask is ignored when calling brw_blorp_clear_color().
    
    This was breaking the 'fbo-drawbuffers-none glClearBuffer' piglit test.
    
    The patch provides the bit mask to brw_blorp_clear_color() so it can limit
    clearing to the color buffers present in the mask.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76832
    Reviewed-by: Eric Anholt <eric@anholt.net>

Thanks, Iago!


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.