[Piglit] [PATCH] generated_tests: Fix geometry shader tests to use gl_VerticesIn

Ken Phillis Jr kphillisjr at gmail.com
Fri Feb 22 18:21:30 PST 2013


I can confirm that this change is valid, and more closely follows the
examples for geometry shaders that appear on the opengl Wiki...

http://www.opengl.org/wiki/Geometry_Shader_Examples

On Fri, Feb 22, 2013 at 7:56 AM, Paul Berry <stereotype441 at gmail.com> wrote:
> Commit ff315ae (Add geometry testing to code-generated tests)
> erroneously omitted the parentheses when calling
> glPositionIn.length().  It also failed to account for the fact that
> the .length() method is unavailable in GLSL 1.10.
>
> This patch modifies the code to use gl_VerticesIn instead, since this
> is provided by ARB_geometry_shader4, and hence is available regardless
> of the GLSL version being tested.
>
> Thanks to Ken Phillis Jr for discovering this bug.
>
> Cc: Ken Phillis Jr <kphillisjr at gmail.com>
> ---
>  generated_tests/gen_builtin_uniform_tests.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/generated_tests/gen_builtin_uniform_tests.py b/generated_tests/gen_builtin_uniform_tests.py
> index 0d43847..e0b6da2 100644
> --- a/generated_tests/gen_builtin_uniform_tests.py
> +++ b/generated_tests/gen_builtin_uniform_tests.py
> @@ -580,7 +580,7 @@ class GeometryShaderTest(ShaderTest):
>             additional_declarations,
>             '  vec4 tmp_color;\n',
>             'tmp_color',
> -           '  for (int i = 0; i < gl_PositionIn.length; i++) {\n'
> +           '  for (int i = 0; i < gl_VerticesIn; i++) {\n'
>             '    gl_Position = gl_PositionIn[i];\n'
>             '    color = tmp_color;\n'
>             '    EmitVertex();\n'
> --
> 1.8.1.4
>


More information about the Piglit mailing list