Fix maximum location for varying location limit test
The varying location limit tests for enhanced layouts produces
shader code where it attempts to use a location that is 1 slot
beyond the limit available for each shader stage and expects
linker errors as a result.
However, the functions it uses to compute the maximum location
slot available in a shader stage also consider the stage it will
be linked to to cap that limit (which is required to produce valid
shader code in other tests that also use these functions).
This affects scenarios where, for example, one stage allows up to
32 output locations but the stage it is linked to only accepts
up to 16 inputs. In such scenario, these functions will return
a limit of 16 for the stage that can output 32 so the shader code
produced can link.
However, the varying location limit test intends to produce an
invalid location by adding 1 to the maximum location slot for that
stage (so it wants to produce 32 + 1 = 33 in the case above), so
in this particular case we want the connecting stage to be
ignored.
Add a boolean flag to these functions so we can select between both
behaviors when computing the maximum location for a given stage
and make the varying location limit test force the behavior where
the maximum location in the connecting shader stages is ignored.
Components: OpenGL
VK-GL-CTS issue: 863
Affects:
KHR-GL45.enhanced_layouts.varying_location_limit
KHR-GL46.enhanced_layouts.varying_location_limit
KHR-GL45.enhanced_layouts.varying_locations
KHR-GL46.enhanced_layouts.varying_locations
KHR-GL45.enhanced_layouts.varying_array_locations
KHR-GL46.enhanced_layouts.varying_array_locations
KHR-GL45.enhanced_layouts.varying_components
KHR-GL46.enhanced_layouts.varying_components
KHR-GL45.enhanced_layouts.varying_array_components
KHR-GL46.enhanced_layouts.varying_array_components
Change-Id: If766582bf494942abdad3e1dde5e1ed8149f4333