Fix locations in enhanced layouts tests
Some of the tests query the last output location in
each shader stage and write an output to them that is
then read in the next shader stage, but they do not
consider if that location exists in the next shader
stage.
Fix this by selecting the maximum output location to
use as the minimum between the stage's maximum output
location and the next stage's maximum input location.
The same issue applies to the maximum input location
available in each shader stage.
Components: OpenGL
VK-GL-CTS issue: 708
Affects:
KHR-GL45.enhanced_layouts.varying_components
KHR-GL45.enhanced_layouts.varying_locations
KHR-GL45.enhanced_layouts.varying_location_limit
KHR-GL46.enhanced_layouts.varying_components
KHR-GL46.enhanced_layouts.varying_locations
KHR-GL46.enhanced_layouts.varying_location_limit
Change-Id: Iacf84bd3eeb33eadaf5a9a816f7ebb7205492af5