[Piglit] [PATCH 6/6] Add geometry testing to code-generated tests.

Paul Berry stereotype441 at gmail.com
Fri Feb 22 05:52:36 PST 2013


On 22 February 2013 00:01, Ken Phillis Jr <kphillisjr at gmail.com> wrote:

> Just a quick question, Which versions of glsl is this test supposed to
> cover?
>
> Based on the coding techniques it looks like it covers strictly nvidia
> based
> glsl that is not always up to spec.
>
> GLSL 1.20 to GLSL 3.30: Just reading the specs on this do not allow
> statements like: ( Also, there is no clear example showing this )
> variable.length
>
> However, there is the length function that does exist can be of use, so
> the following type of call is good:
> variable.length()
>
> See:  section 4.1.9 ( Arrays ) for how to handle this on GLSL 1.20 to 3.30.
>
> NOTE: variable.length  is valid under CG, so this clearly seems to be
> nvidia
> based driver behavior tests.
>
> GLSL 1.10: there is no length function for arrays. So the only available
> option is to use the following on geometry shader tests since it is a
> constant defined at link time.
>  gl_VerticesIn.
>

This was simply an oversight--my intention was for each test to be
compliant with ARB_geometry_shader4 and the version of GLSL corresponding
to the subdirectory the test is placed in.  I only had an nVidia system
available for validating the tests, and since it accepts the non-standard
syntax, I didn't notice my mistake.

Since this patch has already landed in Piglit, I will make a follow-up
patch that changes the test to use gl_VerticesIn, as you suggest.


>
> On Thu, Feb 14, 2013 at 10:50 AM, Paul Berry <stereotype441 at gmail.com>
> wrote:
> > This patch adds geometry shader variants to the code-generated
> > built-in function tests produced by gen_builtin_uniform_tests.py and
> > gen_constant_array_size_tests.py.
> > ---
> >  generated_tests/gen_builtin_uniform_tests.py     | 127
> ++++++++++++++++++++---
> >  generated_tests/gen_constant_array_size_tests.py |  42 +++++++-
> >  2 files changed, 153 insertions(+), 16 deletions(-)
> >
> > diff --git a/generated_tests/gen_builtin_uniform_tests.py
> b/generated_tests/gen_builtin_uniform_tests.py
> > index 323985f..dc59b18 100644
> > --- a/generated_tests/gen_builtin_uniform_tests.py
> > +++ b/generated_tests/gen_builtin_uniform_tests.py
>
> Just quickly removing a lot of excess patch. The only change needed is
> below.
>
> > +       return self.make_test_shader(
> > +           additional_declarations,
> > +           '  vec4 tmp_color;\n',
> > +           'tmp_color',
> > +           '  for (int i = 0; i < gl_PositionIn.length; i++) {\n'
> > +           '    gl_Position = gl_PositionIn[i];\n'
> > +           '    color = tmp_color;\n'
> > +           '    EmitVertex();\n'
> > +           '  }\n')
> > +
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130222/6360162b/attachment.html>


More information about the Piglit mailing list