Bug 101247 - Mesa fails to link GLSL programs with unused output blocks
Summary: Mesa fails to link GLSL programs with unused output blocks
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: mesa-dev
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2017-05-31 11:42 UTC by Józef Kucia
Modified: 2018-09-06 07:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Józef Kucia 2017-05-31 11:42:16 UTC
Mesa fails to link GLSL programs with unused output blocks declared in a shader object other than the main one.

piglit: https://lists.freedesktop.org/archives/piglit/2017-May/022302.html

This bugs affects multiple application in Wine when GL core profiles are enabled.
Comment 1 Samuel Pitoiset 2017-05-31 13:02:16 UTC
Thanks for reporting this. I saw your piglit test yesterday. It's a bug yes.
Comment 2 vadym 2018-08-22 11:19:09 UTC
Patch: https://patchwork.freedesktop.org/patch/245518/
Comment 3 vadym 2018-08-27 10:37:00 UTC
Patch merged to master:

commit 4a8444d5bc865119218eca8674e5614535f4829e (HEAD -> new_master, origin/master, origin/HEAD)
Author: vadym.shovkoplias <vadim.shovkoplias@gmail.com>
Date:   Thu Aug 23 13:12:16 2018 +0300

    glsl/linker: Allow unused in blocks which are not declated on previous stage
    >From Section 4.3.4 (Inputs) of the GLSL 1.50 spec:
        "Only the input variables that are actually read need to be written
         by the previous stage; it is allowed to have superfluous
         declarations of input variables."
        * interstage-multiple-shader-objects.shader_test
      Update comment in ir.h since the usage of "used" field
      has been extended.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101247
    Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
    Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
    Reviewed-by: Timothy Arceri <tarceri@itsqueeze.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.