Bug 83080

Summary: [SNB+ Bisected]ES3-CTS.shaders.loops.do_while_constant_iterations.mixed_break_continue_fragment fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Matt Turner <mattst88>
Status: VERIFIED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: high CC: idr
Version: unspecified   
Hardware: All   
OS: Linux (All)   
i915 platform: i915 features:

Description lu hua 2014-08-26 05:25:25 UTC
System Environment:
Platform: HSW
Libdrm:		(master)libdrm-2.4.56-10-g22b995d8cbf1059535c5de5ba1869c1623ae5b08
Mesa:		(master)306e421887720b149be77c749108bcffcebe34f6
Xserver:	(master)xorg-server-
Libva:		(master)acfcd5f0637a951d50c5112c7dfbd46f1d0dcdb3
Kernel:   (drm-intel-nightly)257d90d13794c2eb545ab0d6c708f21e2a0378b6

ug detailed description:
It fails on SNB+ platforms with mesa master branch, works well on Mesa 10.3 branch.
Following cases also fail and have same bisect commit

Bisect shows:b8aa1005c82ff732f714cd0dcca39775aa368dd7 is the first bad commit
commit b8aa1005c82ff732f714cd0dcca39775aa368dd7
Author:     Matt Turner <mattst88@gmail.com>
AuthorDate: Thu Jul 17 10:50:31 2014 -0700
Commit:     Matt Turner <mattst88@gmail.com>
CommitDate: Fri Aug 22 10:23:34 2014 -0700

    i965/fs: Preserve CFG in predicated break pass.

    Operating on this code,

    B0: ...
        (+f0) if(8)
    B1: break(8)
    B2: endif(8)

    We can delete B2 without attempting to merge any blocks, since the
    break/continue instruction necessarily ends the previous block.

    After deleting the if instruction, we attempt to merge blocks B0 and B1.

    Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>

dEQP Core GL-CTS-2.0 (0x0052484b) starting..
  target implementation = 'X11'

Test case 'ES3-CTS.shaders.loops.do_while_constant_iterations.mixed_break_continue_fragment'..
Vertex compile time = 0.142000 ms
Fragment compile time = 0.299000 ms
Link time = 0.586000 ms
  Fail (Fail)


Test run totals:
  Passed:        0/1 (0.00%)
  Failed:        1/1 (100.00%)
  Not supported: 0/1 (0.00%)
  Warnings:      0/1 (0.00%)

Reproduce steps:
1. xinit
2. ./glcts --deqp-case=ES3-CTS.shaders.loops.do_while_constant_iterations.mixed_break_continue_fragment
Comment 1 Matt Turner 2014-08-31 18:04:58 UTC
Patch sent that fixes it for me.

i965/fs: Connect cfg properly in predicated break peephole.
Comment 2 lu hua 2014-09-03 07:00:35 UTC
(In reply to comment #1)
> Patch sent that fixes it for me.
> i965/fs: Connect cfg properly in predicated break peephole.

It still fails on latest master branch.
Comment 3 Matt Turner 2014-09-03 07:02:01 UTC
Right... it's not committed yet.
Comment 4 Matt Turner 2014-09-05 17:24:10 UTC
commit 3e248e0418370373ac5bcee4b0a88b501b5b22a9
Author: Matt Turner <mattst88@gmail.com>
Date:   Sun Aug 31 11:07:58 2014 -0700

    i965/fs: Connect cfg properly in predicated break peephole.
    If the ENDIF instruction was the only instruction in its block, we'd
    leave the successors of the merged if+jump block in a bad state.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83080
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 5 lu hua 2014-09-09 02:11:03 UTC

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.