[Piglit] [PATCH] arb_shader_image_load_store: compiler tests for memory qualifiers

Francisco Jerez currojerez at riseup.net
Thu Dec 4 02:33:06 PST 2014


Jordan Justen <jordan.l.justen at intel.com> writes:

> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Francisco Jerez <currojerez at riseup.net>
> ---
> Francisco,
>
> Question for your image-load-store branch:
>
> Should we parse the memory qualifiers separately from
> storage_qualifier?
>

Yes, I've had something like that lying around in my private branch for
a while.  See:

http://cgit.freedesktop.org/~currojerez/mesa/commit/?h=image-load-store&id=898af6f9bf61c1c4f870ffbf8ebf6a5ed35f8f64

I don't think this piglit test is necessary.  There are *plenty* of test
cases that hit this bug in the ARB_shader_image_load_store series I sent
for review two months ago.  If you want to help out maybe you could
review a few of them.  I realize that the series doesn't even apply
cleanly anymore, I'll rebase it shortly, send a v2 and push the only one
patch that has been reviewed (by Dylan) right away.

> I did a quick hack to bypass this issue:
> -      if ($2.has_storage())
> +      if ($1.has_storage() && $2.has_storage())
>
> -Jordan
>
>  tests/all.py                                                   |  2 +-
>  .../compiler/memory_qualifier_coherent.frag                    | 10 ++++++++++
>  .../compiler/memory_qualifier_readonly.frag                    | 10 ++++++++++
>  .../compiler/memory_qualifier_restrict.frag                    | 10 ++++++++++
>  .../compiler/memory_qualifier_volatile.frag                    | 10 ++++++++++
>  .../compiler/memory_qualifier_writeonly.frag                   | 10 ++++++++++
>  6 files changed, 51 insertions(+), 1 deletion(-)
>  create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag
>  create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag
>  create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag
>  create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag
>  create mode 100644 tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag
>
> diff --git a/tests/all.py b/tests/all.py
> index d15c3bd..5060c7b 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -4245,7 +4245,7 @@ arb_shader_image_load_store = {}
>  spec['ARB_shader_image_load_store'] = arb_shader_image_load_store
>  import_glsl_parser_tests(spec['ARB_shader_image_load_store'],
>                           os.path.join(testsDir, 'spec', 'arb_shader_image_load_store'),
> -                         [''])
> +                         ['compiler'])
>  arb_shader_image_load_store['atomicity'] = concurrent_test('arb_shader_image_load_store-atomicity')
>  arb_shader_image_load_store['bitcast'] = concurrent_test('arb_shader_image_load_store-bitcast')
>  arb_shader_image_load_store['coherency'] = concurrent_test('arb_shader_image_load_store-coherency')
> diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag
> new file mode 100644
> index 0000000..25042a0
> --- /dev/null
> +++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_coherent.frag
> @@ -0,0 +1,10 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_shader_image_load_store
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_shader_image_load_store: enable
> +
> +layout(rgba8) coherent uniform image2D tex;
> diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag
> new file mode 100644
> index 0000000..9381964
> --- /dev/null
> +++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_readonly.frag
> @@ -0,0 +1,10 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_shader_image_load_store
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_shader_image_load_store: enable
> +
> +layout(rgba8) readonly uniform image2D tex;
> diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag
> new file mode 100644
> index 0000000..2757b25
> --- /dev/null
> +++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_restrict.frag
> @@ -0,0 +1,10 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_shader_image_load_store
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_shader_image_load_store: enable
> +
> +layout(rgba8) restrict uniform image2D tex;
> diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag
> new file mode 100644
> index 0000000..bd4dbba
> --- /dev/null
> +++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_volatile.frag
> @@ -0,0 +1,10 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_shader_image_load_store
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_shader_image_load_store: enable
> +
> +layout(rgba8) volatile uniform image2D tex;
> diff --git a/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag
> new file mode 100644
> index 0000000..4aa8dfe
> --- /dev/null
> +++ b/tests/spec/arb_shader_image_load_store/compiler/memory_qualifier_writeonly.frag
> @@ -0,0 +1,10 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_shader_image_load_store
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_shader_image_load_store: enable
> +
> +writeonly uniform image2D tex;
> -- 
> 2.1.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20141204/6920d0e0/attachment.sig>


More information about the Piglit mailing list