Bug 99030 - [HSW, regression] transform feedback fails on Linux 4.8
Summary: [HSW, regression] transform feedback fails on Linux 4.8
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-08 18:18 UTC by Mark Janes
Modified: 2017-01-06 20:25 UTC (History)
2 users (show)

See Also:
i915 platform: HSW
i915 features:


Attachments

Description Mark Janes 2016-12-08 18:18:39 UTC
dEQP / GLES CTS transform feedback tests fail intermittently on HSW with upstream Linux 4.8:

ES3-CTS.functional.transform_feedback.array_element.interleaved.lines.lowp_vec2
Standard Output
Transform feedback varyings: { v_varA[1], v_varB[0], v_varB[3] }
Transform feedback varyings reported by compiler:
GL_TRANSFORM_FEEDBACK_VARYINGS = 3
v_varA[1]: vec2[1]
v_varB[0]: vec2[1]
v_varB[3]: vec2[1]


Tests pass reliably on Linux 4.7

Bisection was proposed to be done on EZBench in Intel's bug tracker:
https://jira01.devtools.intel.com/browse/VIZ-8798

However, since that hasn't been done, perhaps someone else should find and fix the issue.
Comment 1 Jordan Justen 2016-12-08 18:34:57 UTC
In my case it was not intermittent.

I was also able to reproduce with piglit's
arb_transform_feedback2-draw-auto test.
Comment 2 Chris Wilson 2016-12-08 23:29:38 UTC
arb_transform_feedback2-draw-auto bisects to

6761d0a184efe5a735dfcd9c9f7ac08b2d44d657 is the first bad commit
commit 6761d0a184efe5a735dfcd9c9f7ac08b2d44d657
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri May 6 08:50:14 2016 +0100

    drm/i915: Allow MI_LOAD_REGISTER_REG between whitelisted registers.
    
    Allowing register copies where the source and destination are both
    whitelisted should be safe, and is useful.  For example, Mesa uses
    this to load the command streamer math registers with data from the
    pipeline statistics counters.

Just setting cmd_parser.version=6 is enough to make the test pass, suggesting that this is a very different bug to ES3-CTS.functional.transform_feedback.array_element.interleaved.lines.lowp_vec2
Comment 3 Chris Wilson 2016-12-08 23:44:51 UTC
Missing flush before saving SOL_OFFSET in hsw_pause_transform_feedback().
Comment 4 Kenneth Graunke 2017-01-06 08:10:51 UTC
Thanks Chris!  That was indeed the problem.

Patch on the list:
https://lists.freedesktop.org/archives/mesa-dev/2017-January/139754.html
Comment 5 Kenneth Graunke 2017-01-06 20:25:14 UTC
Fixed by:

commit 2138347a45fa6dad1934b1c58a9e7d7f53194828
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Jan 6 00:09:53 2017 -0800

    i965: Properly flush in hsw_pause_transform_feedback().
    
    Fixes a number of transform feedback tests when run with Linux 4.8,
    which allows us to use the MI_LOAD_REGISTER_REG command, at which point
    we started using this new broken path.
    
    ES3-CTS.functional.transform_feedback.array_element.interleaved.lines.*
    and Piglit's arb_transform_feedback2/draw-auto are both fixed by this
    patch, for example.
    
    Thanks to Chris Wilson for catching this mistake!
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99030
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Anuj Phogat <anuj.phogat@gmail.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.