pipeline statistics test: Fix compute shader setup in !GL4.3 case.
authorEric Anholt <anholt@google.com>
Fri, 11 Dec 2020 20:17:44 +0000 (12:17 -0800)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 7 Jan 2021 09:52:49 +0000 (09:52 +0000)
commit527abc5dc3c1d537aa0bd1e7fb680e0112483341
tree88309183b90b0c02929e1dba5162813f4af4de3b
parent6b2c0631248904c62d27c549d97c19631d7539ef
pipeline statistics test: Fix compute shader setup in !GL4.3 case.

The ARB_compute_shader spec states a requirement for GL4.2/GLSL 4.20
or better, but we were using "#version 430" regardless, causing a
compile failure on older versions.  Add a variant of the shader using
the ARB_compute_shader extension instead.

I picked GLSL 330 for the variant because the test is included in the
GL 3.3 test set, and Mesa's softpipe driver exposes ARB_compute_shader
on GL 3.3 -- the GLSL requirement in the spec seems to be more than is
actually necessary for compute shaders, assuming you have
ARB_shader_image_load_store and such as well.  Since we're doing this
pre-4.2, we have to add the dependency on ARB_shader_atomic_counters
as well.

VK-GL-CTS Issue: 2694
Components: OpenGL
Affects: KHR-GL33.pipeline_statistics_query_tests_ARB.functional_compute_shader_invocations

Change-Id: If37e0e10bed86281d07aed67394075844e88003d
external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.cpp
external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.hpp