Skip impossible shader stages in image load store max uniforms test.
authorKenneth Graunke <kenneth.w.graunke@intel.com>
Sun, 24 Sep 2017 23:18:11 +0000 (16:18 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 17 Oct 2017 07:55:17 +0000 (03:55 -0400)
commit8d67a9f973cff291903e6fba39e2128d1058ecdb
tree1cebbf693e0742f92ccb67c9cf459ff96be155af
parent0949de26f594f378cd503ded59ff99e41e6f56ad
Skip impossible shader stages in image load store max uniforms test.

Implementations not required to support images in the geometry stages,
and are allowed to advertise 0 for:

    * GL_MAX_VERTEX_IMAGE_UNIFORMS
    * GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS
    * GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS
    * GL_MAX_GEOMETRY_IMAGE_UNIFORMS

This means that gl_Max*ImageUniforms may be 0, which means that

    #define N_UNIFORMS gl_MaxVertexImageUniforms
    layout(r32i) uniform iimage2D u_image[N_UNIFORMS];

will define a zero sized array, which is illegal.  To work around this,
simply skip stages that have zero supported image uniforms - there's
nothing to test there, anyway.

Components: OpenGL

VK-GL-CTS issue: 712

Affects:
* KHR-GL45.shader_image_load_store.uniform-limits

Change-Id: I14116ff8b4714e04b35ce0929ed68ed0f38e7d52
external/openglcts/modules/gl/gl4cShaderImageLoadStoreTests.cpp