Fix locations in enhanced layouts tests
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 22 Sep 2017 09:06:50 +0000 (11:06 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 1 Oct 2017 14:36:53 +0000 (10:36 -0400)
commit8a21b9255ac3cb2990710b76b21c7ffb96758870
tree543fc09139b15505c1dce8d02dfe708a17fc7a46
parent81e4da72a883ef860542d12e848f8cca2da8d78b
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
external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp