Bug 92793

Summary: Precision qualifier information gets lost
Product: Mesa Reporter: Tapani Pälli <lemody>
Component: glsl-compilerAssignee: Tapani Pälli <lemody>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 92778    

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.