Bug 36649 - [bisected SNB]oglc draw-buffers2 failed with 16-wide
Summary: [bisected SNB]oglc draw-buffers2 failed with 16-wide
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 00:04 UTC by fangxun
Modified: 2011-05-24 02:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
draw-buffers2(advanced.blending.global) output (2.06 KB, text/plain)
2011-05-06 02:19 UTC, fangxun
Details

Description fangxun 2011-04-28 00:04:21 UTC
System Environment:
--------------------------
Arch:           x86_64
Platform:     Sandybridge  
Libdrm:  (master)2.4.25
Mesa:    (master)b8de75d53760fb359d10d6f4794f28097210cef4
Xserver:(master)xorg-server-1.10.0-257-g918a9c99cf2ebc73acb34b95f597904b93c690d9
Xf86_video_intel:(master)2.15.0-6-g67e5a74e997f199327f9115c7ba867df3c49da8d
Kernel: (drm-intel-next)daab1470018f025e0b1c8731dfb825ff421ffd9b

Bug detailed description:
-------------------------
This case failed on all our Sandybridge machines, and there are other 8 cases failed due to the same cause. Below are these cases.

ogles2conform case: GL/gl_FragCoord/gl_FragCoord_w_frag.test
oglc case: draw-buffers2(advanced.blending.global),  draw-buffers2(advanced.blending.drawGLSL), draw-buffers2(advanced.blending.setOnOther), draw-buffers2(advanced.mask.global), draw-buffers2(advanced.mask.drawGLSL), draw-buffers2(advanced.mask.setOnOther), draw-buffers2(misc.pushPop).
 
Test output:  
Probe at (125,125)
  Expected: 1.000000 0.500000 1.000000
  Observed: 1.000000 1.000000 1.000000
PIGLIT: {'result': 'fail' }

Bisect shows 662f1b48bd1a02907bb42ecda889a3aa52a5755d is the first bad commit.
commit 662f1b48bd1a02907bb42ecda889a3aa52a5755d
Author:     Eric Anholt <eric@anholt.net>
AuthorDate: Fri Mar 11 19:19:01 2011 -0800
Commit:     Eric Anholt <eric@anholt.net>
CommitDate: Tue Apr 26 12:19:46 2011 -0700

    i965/fs: Add initial support for 16-wide dispatch on gen6.

    At this point it doesn't do uniforms, which have to be laid out the
    same between 8 and 16.  Other than that, it supports everything but
    flow control, which was the thing that forced us to choose 8-wide for
    general GLSL support.

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>


Reproduce steps:
-------------------------
1. start X
2. shader_runner -auto tests/shaders/fragcoord_w.shader_test
Comment 1 Eric Anholt 2011-04-29 12:32:00 UTC
Thanks for the quick bisect!

commit 03b2e0fcdf92c76411a957c3ea898233fb4ce1be
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Apr 29 12:17:02 2011 -0700

    i965: Fix fragcoord_w on gen6 with 16-wide.
    
    The payload regs can go all the way up to register 60+, so just give
    them 8 bits to be addressed by instead of 3-4 (which made source_w_reg
    of 8 end up 0).  There's no reason to aggressively pack these fields,
    as they are just used as compiler information, where being easier to
    access is probably more important than shaving a byte or two off of
    the structure.
    
    Fixes piglit fragcoord_w.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36649
Comment 2 fangxun 2011-05-06 02:19:14 UTC
Created attachment 46389 [details]
draw-buffers2(advanced.blending.global) output 

Commit 03b2e0fcdf92c76411a957c3ea898233fb4ce1be fixed piglit shaders/fragcoord_w
and ogles2conform  GL/gl_FragCoord/gl_FragCoord_w_frag.test, but 
7 oglc draw-buffers2 subcases still fails.  
So reopen the bug.
Comment 3 Eric Anholt 2011-05-11 13:20:54 UTC
When a bugfix has fixed one testcase but not others (without regressing things itself), please open a new bug instead of reopening with the original report of things that weren't fixed.  That's an indication that there were multiple bugs involved, and otherwise it just results in big comment chains and the bug report getting ignored.

I'm trying ./oglconform -v 2 -1 draw-buffers2.cpp, and it's not actually running anything.  Could you include the command line for running one oglconform test you want this report to be about now?  Or, ideally, a minimal testcase for the problem, because oglconform is awful.
Comment 4 fangxun 2011-05-20 00:26:05 UTC
commit 27b03926618ddcafabb7b61e652fe6458b017b24 seems fix this bug.
commit 27b03926618ddcafabb7b61e652fe6458b017b24
Author:     Eric Anholt <eric@anholt.net>
AuthorDate: Wed May 11 12:43:28 2011 -0700
Commit:     Eric Anholt <eric@anholt.net>
CommitDate: Wed May 18 13:57:17 2011 -0700

    i965/fs: Fix discard and alpha test in 16-wide.

    As of gen6, alt-mode (which we use) MOVs of floats are not raw --
    they'll modify infs/nans.  This broke discard and alpha test in
    16-wide, where apparently the upper 8 bits of the pixel enables being
    set were causing the whole value to get trashed upon being moved.
    Treating the values as UD instead of float makes sure they get
    preserved.  While I'm here, replace the two 8-wide moves of the halves
    of the header with a single compressed move.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36648
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 5 fangxun 2011-05-24 02:44:19 UTC
Verified with mesa master commit d0c6d24a9ebe31b3a805e8f5845fc7e6fa552a98.


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.