Bug 77856

Summary: [BDW]Piglit spec_OpenGL_3.0_clearbuffer-mixed-format fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: VERIFIED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description lu hua 2014-04-24 03:35:18 UTC
System Environment:
--------------------------
Platform: Broadwell
Libdrm:		(master)libdrm-2.4.53-6-gd4083dc762a2974c35ecd16be995272bbb6d57b4
Mesa:		(master)34a68345e228b7cbc1bc6909704a89c08bf5368e
Xserver:	(master)xorg-server-1.15.99.902-47-ge924034269532979f1e88947ee9c33d30461edae
Xf86_video_intel:(master)2.99.911-94-gbb5b21e34f6cbe44a249e566471754b45c500e60
Libva:		(staging)8577efbd3b1d4e8f113f78cf13d2182aa681b738
Libva_intel_driver:(staging)42258e128f19b93aa102672d5f61eb73d9f9808f
Kernel:	(drm-intel-nightly)1e771b84e47085ef9b6efea1321e7cb5a8b2c065

Bug detailed description:
-----------------------------
It fails on Broadwell with Mesa master branch, but works well on Haswell.
output:
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 4: 8086:1616, driver i965
libGL: OpenDriver: trying /opt/X11R7/lib/dri/i965_dri.so
Probe color at (0,0)
  Expected: 0.500000 0.300000 0.700000 0.000000
  Observed: 0.000000 0.000000 0.000000 0.000000
  from color attachment 0.
Probe color at (0,0)
  Expected: 0.800000 0.000000 0.200000 1.000000
  Observed: 0.000000 0.000000 0.000000 0.000000
  from color attachment 1 [details] [review].
Probe color at (0,0)
  Expected: 1.200000 -2.900000 0.200000 5.800000
  Observed: -nan -nan -nan 0.000000
  from color attachment 2 [details] [review].
Probe color at (0,0)
  Expected: 0.500000 2.500000 -5.200000 1.000000
  Observed: -nan -nan -nan 0.000000
  from color attachment 3 [details] [review].
Probe color at (0,0)
  Expected: 10 90 100 150
  Observed: 255 255 255 50
  from color attachment 4 [details] [review].
Probe color at (0,0)
  Expected: 15 25 20 15
  Observed: 4294967246 4294967246 4294967246 50
  from color attachment 5 [details] [review].
Probe color at (0,0)
  Expected: 100 190 200 -15
  Observed: -50 -50 -50 50
  from color attachment 6 [details] [review].
PIGLIT: {'result': 'fail' }


Reproduce steps:
----------------------------
1. xinit
2. ./bin/clearbuffer-mixed-format -fbo -auto
Comment 2 Kenneth Graunke 2014-05-08 06:55:55 UTC
Fixed by:

commit 9701c6984d8d6570d90a15f86872b16bdba117f2
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri May 2 01:10:17 2014 -0700

    meta: Only clear the requested color buffers.
    
    This path is used to implement both glClear and glClearBuffer; the
    latter is only supposed to clear particular buffers.  Core Mesa provides
    us that information in the buffers bitmask; we must only clear buffers
    mentioned there.
    
    To accomplish this, we save/restore the color draw buffers state, and
    use glDrawBuffers to restrict drawing to the relevant buffers.
    
    Fixes Piglit's spec/!OpenGL 3.0/clearbuffer-mixed-formats and
    spec/ARB_framebuffer_object/fbo-drawbuffers-none glClearBuffer tests
    for drivers using meta clears (such as Broadwell).
    
    Cc: "10.2" <mesa-stable@lists.freedesktop.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77852
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77856
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
Comment 3 lu hua 2014-05-12 05:57:17 UTC
Verified.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.