[Piglit] [PATCH] arb_enhanced_layouts: test a case with explicit non-zero offset in named UBOs

Timothy Arceri timothy.arceri at collabora.com
Mon Oct 31 22:57:56 UTC 2016


Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>

On Mon, 2016-10-31 at 21:55 +0100, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> This shows an error in UBO load lowering.
> ---
>  .../fs-ubo-named-block-explicit-offset.shader_test | 30
> ++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 tests/spec/arb_enhanced_layouts/execution/fs-ubo-
> named-block-explicit-offset.shader_test
> 
> diff --git a/tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-
> block-explicit-offset.shader_test
> b/tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-block-
> explicit-offset.shader_test
> new file mode 100644
> index 0000000..7af7454
> --- /dev/null
> +++ b/tests/spec/arb_enhanced_layouts/execution/fs-ubo-named-block-
> explicit-offset.shader_test
> @@ -0,0 +1,30 @@
> +# Test access to a uniform buffer object via dereferencing the block
> name,
> +# where the first member has an explicit, non-zero offset.
> +
> +[require]
> +GLSL >= 1.50
> +GL_ARB_enhanced_layouts
> +GL_ARB_uniform_buffer_object
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#extension GL_ARB_enhanced_layouts : require
> +#extension GL_ARB_uniform_buffer_object : require
> +
> +layout(std140) uniform Block {
> +    layout(offset = 16) vec4 a;
> +} block_name;
> +
> +out vec4 outcolor;
> +
> +void main()
> +{
> +    outcolor = block_name.a;
> +}
> +
> +[test]
> +uniform vec4 Block.a 0.25 1.0 0.33 1.0
> +
> +draw rect -1 -1 2 2
> +probe all rgba 0.25 1.0 0.33 1.0


More information about the Piglit mailing list