Bug 92793 - Precision qualifier information gets lost
Summary: Precision qualifier information gets lost
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 92778
  Show dependency treegraph
 
Reported: 2015-11-03 11:54 UTC by Tapani Pälli
Modified: 2015-11-16 05:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tapani Pälli 2015-11-03 11:54:47 UTC
GLSL IR does not preserve precision information for variables. This is required to make precision validation checks when linking separate shader objects on OpenGL ES 3.1.

Iago's precision qualifier patches should be enough to tackle this:

https://patchwork.freedesktop.org/patch/43442/
Comment 1 Tapani Pälli 2015-11-03 12:59:22 UTC
I'll rebase Iago's patches and work on the linker checks
Comment 2 Tapani Pälli 2015-11-05 11:45:46 UTC
I've done this. Did not rebase linker checks just yet as ES 3.1 is failing for runtime validation of pipeline (not during linking). Will rebase linking part later if these changes get accepted.
Comment 3 Tapani Pälli 2015-11-13 18:34:37 UTC
precision information is now in IR level and required linker checks and runtime validation can be done
Comment 4 Kenneth Graunke 2015-11-15 13:27:08 UTC
FWIW, these changes broke tessellation shaders...I had to revert

    commit 5bd122cad9d16596f89260f3b115cd0fb72cb886
    glsl: do not lose precision information when packing varyings

    commit f84bc57d7dc02fceb805803131426c791eadeff9
    glsl: Add precision information to ir_variable

to prevent the linker from saying that gl_PerVertex blocks don't match up.

Ilia confirmed that this broke tessellation for Nouveau.

If you want to try it on Intel (Broadwell only), you can grab my 'tess' branch and run:
$ shader_runner tests/spec/arb_tessellation_shader/execution/nop.shader_test

(you'll need to rebase -i out my reverts of those patches to trigger the bug)
Comment 5 Tapani Pälli 2015-11-16 05:36:45 UTC
(In reply to Kenneth Graunke from comment #4)
> FWIW, these changes broke tessellation shaders...I had to revert
> 
>     commit 5bd122cad9d16596f89260f3b115cd0fb72cb886
>     glsl: do not lose precision information when packing varyings
> 
>     commit f84bc57d7dc02fceb805803131426c791eadeff9
>     glsl: Add precision information to ir_variable
> 
> to prevent the linker from saying that gl_PerVertex blocks don't match up.
> 
> Ilia confirmed that this broke tessellation for Nouveau.
> 
> If you want to try it on Intel (Broadwell only), you can grab my 'tess'
> branch and run:
> $ shader_runner tests/spec/arb_tessellation_shader/execution/nop.shader_test
> 
> (you'll need to rebase -i out my reverts of those patches to trigger the bug)

sorry about this, I'll take a look at what is wrong, precision should be ignored on desktop


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.