Fix KHR-GL45/46.enhanced_layouts.varying_block_member_locations
authorEleni Maria Stea <estea@igalia.com>
Wed, 20 Sep 2017 11:28:40 +0000 (14:28 +0300)
committerAntia Puentes <apuentes@igalia.com>
Mon, 9 Oct 2017 13:01:39 +0000 (15:01 +0200)
commit9aba5ace6950c0f642a3cd121c64959e1a4a738f
treee5c5dbbee674aab6e448cb02e15138985c068966
parent8a21b9255ac3cb2990710b76b21c7ffb96758870
Fix KHR-GL45/46.enhanced_layouts.varying_block_member_locations

The stages of the same program used in/out blocks that didn't match
(see section 4.7.1 in OpenGL 4.5 spec: qualification mismatch) and as a
result a linker error was produced. With this change all stages use the
same block definition which is either the 1st or the 2nd depending on
the iteration but not both at the same time:

Goku {
    vec4 gohan;
    vec4 goten;
    vec4 chichi;
} gokuARRAY;

Goku {
    layout (location = 2) vec4 gohan;
    layout (location = 4) vec4 goten;
    layout (location = 6) vec4 chichi;
} gokuARRAY;

Affects:

KHR-GL46.enhanced_layouts.varying_block_member_locations
KHR-GL45.enhanced_layouts.varying_block_member_locations

Components: OpenGL

VK-GL-CTS issue: 703

Change-Id: I03a6a90929e28489a2507838003c62475a8a58b8
(cherry picked from commit 4b6462e469359ac7ddec9c63d042e43ead6031fc)
external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp