Bug 33512 - [SNB] case ogles2conform/GL/gl_FragCoord/gl_FragCoord_xy_frag.test and gl_FragCoord_w_frag.test fail
Summary: [SNB] case ogles2conform/GL/gl_FragCoord/gl_FragCoord_xy_frag.test and gl_Fra...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 7.10
Hardware: Other Linux (All)
: medium normal
Assignee: Kenneth Graunke
QA Contact:
Depends on:
Reported: 2011-01-25 23:24 UTC by Yi Sun
Modified: 2011-06-13 00:52 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Description Yi Sun 2011-01-25 23:24:23 UTC
System Environment:

Kernel: (drm-intel-fixes)c7dca47bd6fbb7c215cb1ce6bc40398b4b017752
Libdrm: (master)2.4.23-6-g550fe2ca3b29ad2191eab4fdfbed9ed21e25492d
Mesa:  (7.10)2d22c508c7df3b89c1459d6d5597c57d05b60632
Xserver: (master)xorg-server-
Xf86_video_intel: (master)2.14.0-12-g5baa63c634990810a66c3150b4f2b76fcee2df38

Bug detailed description:
The Ogles2conform cases GL/gl_FragCoord/gl_FragCoord_xy_frag.test and gl_FragCoord_w_frag.test failed.

Bug reproduce steps:
./GTF -width=64 -height=64 -run=GL/gl_FragCoord/gl_FragCoord_xy_frag.test

./GTF -width=64 -height=64 -run=GL/gl_FragCoord/gl_FragCoord_w_frag.test
Comment 1 Yi Sun 2011-01-25 23:27:35 UTC
Both two cases are passed on IronLake platform.
Comment 2 Kenneth Graunke 2011-02-19 23:26:00 UTC
I have a fix for this in my 'snb-fixes' branch.  I hope to push it on Tuesday (after the holiday).
Comment 3 Kenneth Graunke 2011-02-22 12:40:20 UTC
Fixed in latest Mesa master.

commit 4a3b28113c3d23ba21bb8b8f5ebab7c567083a6d
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sat Feb 19 16:48:24 2011 -0800

    i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.
    pixel_w is the final result; wpos_w is used on gen4 to compute it.
    NOTE: This is a candidate for the 7.10 branch.
    Reviewed-by: Eric Anholt <eric@anholt.net>

commit 3e91070ea81da970b640acf22e2b1aa761161906
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Feb 22 10:04:18 2011 -0800

    i965: Fix shaders that write to gl_PointSize on Sandybridge.
    gl_PointSize (VERT_RESULT_PSIZ) doesn't take up a message register,
    as it's part of the header.  Without this fix, writing to gl_PointSize
    would cause the SF to read and use the wrong attributes, leading to all
    kinds of random looking failure.
    Reviewed-by: Eric Anholt <eric@anholt.net>
Comment 4 Ouping Zhang 2011-02-23 19:50:21 UTC
I have retested the Ogles2conform cases "GL_gl_FragCoord_gl_FragCoord_xy_frag.test" and
"GL_gl_FragCoord_gl_FragCoord_w_frag.test", they can pass in latest Mesa master.

Mesa:commit 6d1f28d6c045f768da2eee779006535acf382cce
Comment 5 Gordon Jin 2011-02-25 00:06:19 UTC
leave open until cherry-picked to 7.10.
Comment 6 Gordon Jin 2011-02-28 23:26:59 UTC
Ken/Ian, have the patches cherry-picked, so we can close this?
Comment 7 Kenneth Graunke 2011-03-01 01:13:19 UTC
This one should stay open; I just reverted the patch to "fix" gl_FragCoord.w on Sandybridge since it regressed Ironlake (bug #34646...I could've sworn I tested that...)
Comment 8 Gordon Jin 2011-03-23 18:46:20 UTC
unblocking Q1 release.
Comment 9 Kenneth Graunke 2011-04-02 19:32:24 UTC
Should be fixed on Mesa master:

commit 5d7fefb9afbcc6f1d58a92d07c390e6b912c3b00
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sun Apr 3 01:39:28 2011 -0700

    i965/fs: Switch W and 1/W in Sandybridge interpolation setup.
    Various documentation mentions that "W" is handed to the WM stage,
    but further digging seems to indicate that they really mean 1/W.
    The code here is still unclear, but changing this fixes piglit
    test "fragcoord_w" on Sandybridge as well as a Khronos ES2 conformance
    test.  I also tested 3DMarkMobile ES2.0's taiji and hoverjet demos, as
    well as Nexuiz, just to be safe.
    NOTE: This is a candidate for the 7.10 branch.
Comment 10 Kenneth Graunke 2011-04-11 13:23:28 UTC
Cherry-picked to 7.10 branch.
Comment 11 Yi Sun 2011-06-13 00:52:47 UTC
Passed on commit mesa (7.10)fc23cc06af90b5945de2c1f5e045b2b93f5ee70b
So verified it.

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.