Bug 77707

Summary: [ILK Bisected]Ogles2conform GL_sin_sin_float_frag_xvary.test fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Juha-Pekka Heikkilä <juhapekka.heikkila>
Status: VERIFIED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: major    
Priority: high CC: juhapekka.heikkila, mattst88
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 79039    
Attachments: output

Description lu hua 2014-04-21 02:55:46 UTC
Created attachment 97657 [details]
output

System Environment:
--------------------------
Platform: Ironlake
Libdrm:		(master)libdrm-2.4.53-6-gd4083dc762a2974c35ecd16be995272bbb6d57b4
Mesa:		(master)ba6dcb3c2b8f516b120f591144bf6c3751f0e3f9
Xserver:	(master)xorg-server-1.15.99.902-20-gc7011249d2abe6cc7af82ee4b79d8f6873444707
Xf86_video_intel:(master)2.99.911-89-g08e71e1820d6fcb6829b4ebd360beadc1f250295
Libva:		(staging)5e10a246287fa2dd3fae2bf756a5b33087cc097c
Libva_intel_driver:(staging)782b8afdda14f000874d8acf51c3e8c490d55773
Kernel:	(drm-intel-nightly)1e771b84e47085ef9b6efea1321e7cb5a8b2c06

Bug detailed description:
-----------------------------
It fails on Ironlake platforms with mesa master branch, and works well on 10.1 branch.
GL_sin_sin_vec2_frag_xvary.test and GL_sin_sin_vec3_frag_xvary.test also fail with same bisect commit.
Bisect shows: a6860100b87415ab510d0d210cabfeeccebc9a0a is the first bad commit
commit a6860100b87415ab510d0d210cabfeeccebc9a0a
Author:     Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
AuthorDate: Fri Mar 28 15:28:33 2014 +0200
Commit:     Matt Turner <mattst88@gmail.com>
CommitDate: Wed Apr 16 22:46:45 2014 -0700

    i965/fs: Change fs_visitor::emit_lrp to use MAC for gen<6

    This allows us to emit ADD/MUL/MAC instead of MUL/ADD/MUL/ADD,
    saving one instruction and two temporary registers.

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>

Reproduce steps:
---------------------------- 
1. xinit
2. GTF -width=64 -height=64 -run=GL/sin/sin_float_frag_xvary.test
Comment 1 lu hua 2014-05-09 01:48:31 UTC
It also fails on Mesa 10.2 branch.
Comment 2 Juha-Pekka Heikkilä 2014-05-09 13:24:13 UTC
I sent patch to mesa-dev which on my test did fix this issue:
http://lists.freedesktop.org/archives/mesa-dev/2014-May/059194.html
Comment 3 Kenneth Graunke 2014-05-12 08:28:25 UTC
I would really like to understand the issue - changing from implicit to explicit seems like it's papering over a bug.  Usually in cases like this, I try to track down the problem by disabling optimizations and seeing if that fixes it.

I found out that disabling constant propagation into the MULs that write the accumulator fixes the problem.  Which is pretty specific.  But the assembly after the optimization looks just as valid...
Comment 4 Matt Turner 2014-05-22 16:53:26 UTC
I've sent a revert for this patch.
Comment 5 Matt Turner 2014-05-25 22:24:09 UTC
Reverted.
Comment 6 lu hua 2014-05-27 01:09:52 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.