Bug 94395 - [ES3.1CTS,BDW,SKL,BSW,SKL,KBL] gpu_shader5 prevents GEN8+ from passing CTS
Summary: [ES3.1CTS,BDW,SKL,BSW,SKL,KBL] gpu_shader5 prevents GEN8+ from passing CTS
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 92778
  Show dependency treegraph
 
Reported: 2016-03-04 20:27 UTC by Mark Janes
Modified: 2016-04-26 00:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mark Janes 2016-03-04 20:27:33 UTC
When gpu_shader5 was enabled, it triggered GLES3.1CTS failures:

es31-cts.gpu_shader5.fma_precision_float
es31-cts.gpu_shader5.fma_precision_vec2
es31-cts.gpu_shader5.fma_precision_vec3
es31-cts.gpu_shader5.fma_precision_vec4
es31-cts.gpu_shader5.precise_qualifier

sample output:

/tmp/build_root/m64/bin/cts/glcts --deqp-case=ES31-CTS.gpu_shader5.fma_precision_vec2
dEQP Core GL-CTS-2.0 (0x0052484b) starting..
  target implementation = 'intel-gbm'

Test case 'ES31-CTS.gpu_shader5.fma_precision_vec2'..
  Fail (Error in test execution)

DONE!

Test run totals:
  Passed:        0/1 (0.00%)
  Failed:        1/1 (100.00%)
  Not supported: 0/1 (0.00%)
  Warnings:      0/1 (0.00%)
Comment 1 Kenneth Graunke 2016-03-05 00:15:16 UTC
Here's a stab in the dark - we set nir_compiler_options::lower_ffma to true, to try and allow for better CSE of MULs and ADDs.  But this causes ffmas that came from the actual fma() GLSL built-in, where the point is increased precision, to be split up as well.

We probably want to avoid *creating* new ffmas, but avoid *splitting* ones that come in from GLSL IR.
Comment 2 Kenneth Graunke 2016-03-26 10:00:56 UTC
These seem to fail, even with Jason's recent precision patches.  Assigning to Jason so he can take a look.
Comment 3 Kenneth Graunke 2016-03-29 06:09:45 UTC
Apparently the fma_precision tests are hitting some kind of transform feedback related bug.  They're getting a GL error when trying to set up their vertex buffers, because their VS inputs apparently don't exist.  It looks like we dead code eliminated the whole program, due to transform feedback outputs being removed for whatever reason.
Comment 4 Kenneth Graunke 2016-04-03 07:58:29 UTC
I have a patch to fix ES31-CTS.gpu_shader5.fma_precision_*.
Comment 5 Kenneth Graunke 2016-04-03 08:42:10 UTC
(In reply to Kenneth Graunke from comment #4)
> I have a patch to fix ES31-CTS.gpu_shader5.fma_precision_*.

And here it is:
https://lists.freedesktop.org/archives/mesa-dev/2016-April/111714.html

I looked into the ES31-CTS.gpu_shader5.precise_qualifier bug, and it is indeed a precision issue caused by fusing multiply adds.  GLSL IR passes appear to be throwing away all precision information.
Comment 6 Kenneth Graunke 2016-04-03 09:14:27 UTC
I have a patch for that as well, though it's a bit of a hack.
Comment 7 Mark Janes 2016-04-11 17:34:13 UTC
mesa 26c56e2 fixes most of these tests.  The only remaining failure is:

es31-cts.gpu_shader5.precise_qualifier
Comment 8 Jordan Justen 2016-04-26 00:08:28 UTC
(In reply to Mark Janes from comment #7)
> mesa 26c56e2 fixes most of these tests.  The only remaining failure is:
> 
> es31-cts.gpu_shader5.precise_qualifier

precise_qualifier is passing for me on gen8 with master.
Comment 9 Mark Janes 2016-04-26 00:19:05 UTC
fixed in mesa 95d622e16df0ddbf52e43a34bd6ed6dd15e3bdee


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.