Bug 102623

Summary: [OpenGL CTS] KHR-GL45.enhanced_layouts.varying_block_automatic_member_locations fails
Product: Mesa Reporter: Juan A. Suarez <jasuarez>
Component: Drivers/DRI/i965Assignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: idr, itoral, jasuarez, kenneth
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 102590    

Description Juan A. Suarez 2017-09-08 12:16:22 UTC
Hardware: Broadwell or Skylake
Mesa commit: 44ac54a3fdc
vk-gl-cts commit: dfcb8e870438


Test KHR-GL45.enhanced_layouts.varying_block_automatic_member_locations fails

"Unexpected success"
Comment 1 Juan A. Suarez 2017-09-08 12:22:16 UTC
This test creates some geometry and tessellation geometry shaders that contains unsized output block arrays

~~~
#version 430 core
#extension GL_ARB_enhanced_layouts : require

layout(points)                           in;
layout(triangle_strip, max_vertices = 4) out;

layout (location = 2) out DBZ {
    vec4 goku;
    vec4 gohan[4];
    vec4 goten;
    layout (location = 1) vec4 chichi;
    vec4 pan;
} dbz[];

in  vec4 tes_gs[];
out vec4 gs_fs;
~~~

According to GLSL 4.30 specification, section 4.3.9 (Interface Blocks)

"Geometry shader input blocks must be declared as arrays and follow the array declaration and linking rules for all geometry shader inputs. All other input and output block arrays must specify an array size."

Though I didn't found it in the spec, Mesa code suggests this also applies to tessellation evaluation shaders.
Comment 2 Ilia Mirkin 2017-09-15 16:00:46 UTC
https://github.com/KhronosGroup/VK-GL-CTS/issues/56

This was my analysis. I believe the issue is that it's expecting a location layout conflict, but it doesn't due to the variables being unused. You may be interested in perusing my analysis of the various other enhanced_layouts failures on the VK-GL-CTS github issues list.
Comment 3 Iago Toral 2017-10-19 16:33:08 UTC
I have just sent a series that fixes this (along with a bunch of other piglit and CTS tests for enhanced layouts):

https://lists.freedesktop.org/archives/mesa-dev/2017-October/173503.html
Comment 4 Kenneth Graunke 2017-11-02 03:12:06 UTC
It looks like Iago's series landed, and this works now.  Marking fixed.

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.