Reset texture data to 0 after each 16 iterations to avoid overflow
authorJianle Wang <jianle.wang@arm.com>
Tue, 20 Oct 2020 02:31:48 +0000 (10:31 +0800)
committerJianle Wang <jianle.wang@arm.com>
Fri, 6 Nov 2020 09:59:53 +0000 (04:59 -0500)
commit332e6560e76dca678d1bbf5582ea9e2dd17b5fed
tree4bc55ddffb2510d328d2e9a2b18517e620bfbc6b
parent01928c37e991e4ead8d767291179a900eaa7e5ef
Reset texture data to 0 after each 16 iterations to avoid overflow

The default precision of int in the fragment shader is mediump. The fs_out_color
in GeometryShaderMaxCombinedTextureUnitsTest::m_fragment_shader_code_body will
overflow when the number of texture unit become large, since each texture data
is equal to index of the texture units.
So reset texture data to 0 after each 16 iterations to avoid the overflow.

Component: OpenGL

Affected tests: KHR-GLES31.core.geometry_shader.limits.max_combined_texture_units

VK-GL-CTS issue: 2622

Change-Id: Icc9f2ed77a5a1cf6f315605f5f1045a60a56396c
(cherry picked from commit ccb924af7b96ee3771ce25f6d31a0b243bbddee1)
external/openglcts/modules/glesext/geometry_shader/esextcGeometryShaderLimits.cpp