Bug 99287

Summary: piglit.spec.glsl-1_10.execution.vs-nested-return-sibling-loop regression
Product: Mesa Reporter: Mark Janes <mark.a.janes>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: maraeo
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Mark Janes 2017-01-05 17:35:00 UTC
This test, along with piglit.spec.glsl-1_10.execution.vs-nested-return-sibling-loop2, regressed on the series ending with:

c7affbf6875622a2326dafafaed8c3987aaa3483
Author:     Marek Olšák <maraeo@gmail.com>
st/mesa: enable GLSLOptimizeConservatively for drivers that want it

Platforms: SNB and later

Standard output:
/tmp/build_root/m64/lib/piglit/bin/shader_runner /tmp/build_root/m64/lib/piglit/tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop.shader_test -auto
Probe color at (0,0)
  Expected: 255 255 0 255
  Observed: 0 255 0 255
Test failure on line 46
Comment 1 Marek Olšák 2017-01-05 17:42:27 UTC
This is the only commit from the series that might affect i965:

commit d3cb79e043338b0e55a3fba8df652f3ce4894d0d
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Sat Dec 31 12:02:26 2016 +0100

    glsl: run do_lower_jumps properly in do_common_optimizations
Comment 2 Kenneth Graunke 2017-01-05 18:51:36 UTC
I have a patch to fix this.  Waiting on test results before sending.
Comment 3 Kenneth Graunke 2017-01-05 20:07:46 UTC
Trivial patch on list:
https://lists.freedesktop.org/archives/mesa-dev/2017-January/139707.html
Comment 4 Kenneth Graunke 2017-01-06 07:16:30 UTC
Fixed:

commit a4d6f4d954d8539c3effbbc3af7f74e9dae32e2c
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Jan 5 10:46:39 2017 -0800

    i965: Don't set EmitNoMainReturn.
    
    A while ago, we stopped using Luca's GLSL IR lower_jumps pass in favor
    of nir_lower_returns().  Marek's commit d3cb79e043338b0e55a3fba8df652f3
    put it in do_common_optimization, which resulted in us calling it again.
    
    Dropping the EmitNoMainReturn setting makes us skip that pass again.
    
    Apparently that pass doesn't work properly, because this fixes Piglit's
    tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99287
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>

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.