[Piglit] [PATCH] generator: clear before rendering with the builtin tests

Ilia Mirkin imirkin at alum.mit.edu
Thu Mar 26 19:18:14 PDT 2015


Can we just make shader_runner do a clear automatically? This has
happened to me a number of times.

On Thu, Mar 26, 2015 at 9:58 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Otherwise there is a chance you'll get the contents from the last
> test which are green, and if this test fails to renderer you'll pass.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  generated_tests/gen_builtin_uniform_tests.py      | 2 ++
>  generated_tests/gen_builtin_uniform_tests_fp64.py | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/generated_tests/gen_builtin_uniform_tests.py b/generated_tests/gen_builtin_uniform_tests.py
> index 528c2c1..b61f95f 100644
> --- a/generated_tests/gen_builtin_uniform_tests.py
> +++ b/generated_tests/gen_builtin_uniform_tests.py
> @@ -538,6 +538,8 @@ class ShaderTest(object):
>          if vs:
>              shader_test += self.make_vbo_data()
>          shader_test += '[test]\n'
> +        shader_test += 'clear color 0.0 0.0 1.0 0.0\n'
> +        shader_test += 'clear\n'
>          shader_test += self.make_test()
>          filename = self.filename()
>          dirname = os.path.dirname(filename)
> diff --git a/generated_tests/gen_builtin_uniform_tests_fp64.py b/generated_tests/gen_builtin_uniform_tests_fp64.py
> index cc53d0c..78c2ace 100644
> --- a/generated_tests/gen_builtin_uniform_tests_fp64.py
> +++ b/generated_tests/gen_builtin_uniform_tests_fp64.py
> @@ -508,6 +508,8 @@ class ShaderTest(object):
>          shader_test += '\n'
>          shader_test += self.make_vbo_data()
>          shader_test += '[test]\n'
> +        shader_test += 'clear color 0.0 0.0 1.0 0.0\n'
> +        shader_test += 'clear\n'
>          shader_test += self.make_test()
>          filename = self.filename()
>          dirname = os.path.dirname(filename)
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list