Make 420pack 'binding' layout qualifier tests check MAX_*_IMAGE_UNIFORMS
authorKenneth Graunke <kenneth.w.graunke@intel.com>
Mon, 25 Sep 2017 04:18:11 +0000 (21:18 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 17 Oct 2017 07:55:43 +0000 (03:55 -0400)
commitd4f86c3ded810bca1a6bfbbe41800aee7ad515f5
tree202292d6f76abe10121842d3ff65ac3aada60f28
parent8d67a9f973cff291903e6fba39e2128d1058ecdb
Make 420pack 'binding' layout qualifier tests check MAX_*_IMAGE_UNIFORMS

Image uniform support is not mandatory for the VS/TCS/TES/GS stages,
so GL_MAX_*_IMAGE_UNIFORMS can report 0.  On such an implementation,
these tests would fail.

This patch skips image testing in any such stages, making them
essentially passthrough shaders.

In BindingImageSingleTest, we also put the binding qualifier in the
fragment shader stage if the stage where we'd normally put it doesn't
support images.  This way, it's guaranteed to exist in at least one
shader stage.

Components: OpenGL

VK-GL-CTS issue: 712

Affects:
* KHR-GL45.shading_language_420pack.binding_images
* KHR-GL45.shading_language_420pack.binding_image_api_override
* KHR-GL45.shading_language_420pack.binding_image_array
* KHR-GL45.shading_language_420pack.binding_image_single
* KHR-GL45.shading_language_420pack.binding_image_default

Change-Id: Ic9eceb4472edff87d5de54ec6318cdb856b0bb8d
external/openglcts/modules/gl/gl4cShadingLanguage420PackTests.cpp
external/openglcts/modules/gl/gl4cShadingLanguage420PackTests.hpp