[Piglit] [PATCH 2/2] arb_bindless_texture: add struct-inside-uniform-block.frag compiler tests

Nicolai Hähnle nhaehnle at gmail.com
Fri Apr 28 12:18:43 UTC 2017


On 28.04.2017 11:48, Samuel Pitoiset wrote:
> The spec doesn't clearly state this, but the spec authors say
> it's allowed.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

Both patches:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


> ---
>  .../images/struct-inside-uniform-block.frag        | 23 +++++++++++++++++++++
>  .../samplers/struct-inside-uniform-block.frag      | 24 ++++++++++++++++++++++
>  2 files changed, 47 insertions(+)
>  create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag
>  create mode 100644 tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag
>
> diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag
> new file mode 100644
> index 000000000..99d393aa2
> --- /dev/null
> +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-inside-uniform-block.frag
> @@ -0,0 +1,23 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_bindless_texture: require
> +#extension GL_ARB_shader_image_load_store: enable
> +
> +struct foo {
> +	float x;
> +	writeonly image2D img;
> +};
> +
> +uniform Block {
> +   foo f;
> +};
> +
> +void main()
> +{
> +	imageStore(f.img, ivec2(0, 0), vec4(1, 2, 3, 4));
> +}
> diff --git a/tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag b/tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag
> new file mode 100644
> index 000000000..fc16827af
> --- /dev/null
> +++ b/tests/spec/arb_bindless_texture/compiler/samplers/struct-inside-uniform-block.frag
> @@ -0,0 +1,24 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 3.30
> +// require_extensions: GL_ARB_bindless_texture
> +// [end config]
> +
> +#version 330
> +#extension GL_ARB_bindless_texture: require
> +
> +struct foo {
> +	float x;
> +	sampler2D tex;
> +};
> +
> +uniform Block {
> +   foo f;
> +};
> +
> +out vec4 color;
> +
> +void main()
> +{
> +	color = texture2D(f.tex, vec2(0, 0));
> +}
>


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the Piglit mailing list