[Piglit] [PATCH v2] arb_gpu_shader_fp64: add preprocessor define tests

Dave Airlie airlied at gmail.com
Sun Aug 10 16:27:59 PDT 2014


Reviewed-by: Dave Airlie <airlied at redhat.com>

On 8 August 2014 20:20, Tapani Pälli <tapani.palli at intel.com> wrote:
> v2: import tests in tests/all.py
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  tests/all.py                                          |  3 +++
>  .../spec/arb_gpu_shader_fp64/preprocessor/define.frag | 19 +++++++++++++++++++
>  .../spec/arb_gpu_shader_fp64/preprocessor/define.vert | 19 +++++++++++++++++++
>  3 files changed, 41 insertions(+)
>  create mode 100644 tests/spec/arb_gpu_shader_fp64/preprocessor/define.frag
>  create mode 100644 tests/spec/arb_gpu_shader_fp64/preprocessor/define.vert
>
> diff --git a/tests/all.py b/tests/all.py
> index 9d7a861..c91533f 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -1873,6 +1873,9 @@ spec['ARB_gpu_shader_fp64'] = arb_gpu_shader_fp64
>  add_shader_test_dir(arb_gpu_shader_fp64,
>                      os.path.join(testsDir, 'spec', 'arb_gpu_shader_fp64'),
>                      recursive=True)
> +import_glsl_parser_tests(arb_gpu_shader_fp64,
> +                    os.path.join(testsDir, 'spec', 'arb_gpu_shader_fp64'),
> +                    [''])
>
>  arb_texture_query_levels = {}
>  spec['ARB_texture_query_levels'] = arb_texture_query_levels
> diff --git a/tests/spec/arb_gpu_shader_fp64/preprocessor/define.frag b/tests/spec/arb_gpu_shader_fp64/preprocessor/define.frag
> new file mode 100644
> index 0000000..85dd9bf
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/preprocessor/define.frag
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_gpu_shader_fp64
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64: require
> +
> +#if !defined GL_ARB_gpu_shader_fp64
> +#  error GL_ARB_gpu_shader_fp64 is not defined
> +#elif GL_ARB_gpu_shader_fp64 != 1
> +#  error GL_ARB_gpu_shader_fp64 is not equal to 1
> +#endif
> +
> +/* Some compilers generate spurious errors if a shader does not contain
> + * any code or declarations.
> + */
> +int foo(void) { return 1; }
> diff --git a/tests/spec/arb_gpu_shader_fp64/preprocessor/define.vert b/tests/spec/arb_gpu_shader_fp64/preprocessor/define.vert
> new file mode 100644
> index 0000000..85dd9bf
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader_fp64/preprocessor/define.vert
> @@ -0,0 +1,19 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_gpu_shader_fp64
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_gpu_shader_fp64: require
> +
> +#if !defined GL_ARB_gpu_shader_fp64
> +#  error GL_ARB_gpu_shader_fp64 is not defined
> +#elif GL_ARB_gpu_shader_fp64 != 1
> +#  error GL_ARB_gpu_shader_fp64 is not equal to 1
> +#endif
> +
> +/* Some compilers generate spurious errors if a shader does not contain
> + * any code or declarations.
> + */
> +int foo(void) { return 1; }
> --
> 1.9.3
>


More information about the Piglit mailing list