Bug 102677 - [OpenGL CTS] KHR-GL45.CommonBugs.CommonBug_PerVertexValidation fails
Summary: [OpenGL CTS] KHR-GL45.CommonBugs.CommonBug_PerVertexValidation fails
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 102590
  Show dependency treegraph
 
Reported: 2017-09-12 16:14 UTC by Kenneth Graunke
Modified: 2017-10-30 17:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Kenneth Graunke 2017-09-12 16:14:07 UTC
This test links together separable programs with incompatible or missing gl_PerVertex block declarations.  It expects a linker error.  We allow the link.
Comment 1 Kenneth Graunke 2017-10-07 07:04:50 UTC
In the failing case, a VS and GS are being linked together into a single program.  The vertex shader contains:

    out gl_PerVertex
    {
        vec4 gl_Position;
    };

while the geometry shader contains:

    in gl_PerVertex
    {
        float gl_ClipDistance[];
    } gl_in[];

which obviously don't match.  Unfortunately, the geometry shader doesn't actually use the gl_ClipDistance input at all, so it gets dead code eliminated at compile time, before we even consider linking.  At link time, validate_interstage_inout_blocks() is supposed to enforce matching types, but there are no longer any GS inputs with an interface type, so it can't check anything.

Not sure what to do about this.
Comment 2 Kenneth Graunke 2017-10-07 13:31:52 UTC
Oh, Eduardo sent patches to fix this back in January:

https://lists.freedesktop.org/archives/mesa-dev/2017-January/142386.html

Khronos made it pretty clear this test is valid:
https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/137
Comment 3 Neil Roberts 2017-10-28 11:15:06 UTC
I’ve posted a v2 of Eduardo’s patches here:

https://lists.freedesktop.org/archives/mesa-dev/2017-October/174550.html
Comment 4 Neil Roberts 2017-10-30 17:30:19 UTC
I’ve pushed the patches to master with Ken’s RB. Thanks!


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.