Fix GL45-CTS.cull_distance.functional test
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 28 Feb 2017 10:05:46 +0000 (10:05 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 10 Mar 2017 16:46:29 +0000 (11:46 -0500)
commiteff165e4c0134157e9c62407136d3737ebe48a29
treeb8bebe5353330f1473f2ad65d9af869bfd74cf2c
parent55d9a18f5831d4263c6fc8355a70cfce41e1cb2e
Fix GL45-CTS.cull_distance.functional test

This commit fixes several issues in this test:

- Coordinate X conversion from float in [0, 1] range to uint in range
[0, m_to_with] is wrong. Same for coordinate Y.

- Offset drawing point for primitive point is wrong.

- Generated vertex shader for the case of dynamic index writes with
culling but not clipping fails to compile, due "unsized array index must
be constant". This happens because we make reference in the code to the
clipdistance array, which is unsized. This problem also happens with
clipping but not culling.

- Program fails to link when using tessellation shaders, due
"definitions of interface block `gl_PerVertex' do not match". This
happens because tessellation control shader redefines gl_PerVertex, but
tessellation evaluation shader don't.

Components: OpenGL

VK-GL-CTS issue: 191

Affects:
GL45-CTS.cull_distance.functional

Change-Id: I5143b45caa5a0490f58628326b44c4373d5c8305
external/openglcts/modules/gl/gl3cCullDistanceTests.cpp