[Piglit] [PATCH] arb_shader_storage_buffer_object: fix TOP_LEVEL_ARRAY_STRIDE expected value for std430 case

Ian Romanick idr at freedesktop.org
Wed Sep 9 14:52:48 PDT 2015


This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 09/09/2015 03:41 AM, Samuel Iglesias Gonsalvez wrote:
> struct B has a size of 52. Interface packing layout qualifier std430 says that
> the array of structures are not rounded up a multiple of the base alignment of
> a vec4 but to the next multiple of the base alignment of the structure.
> 
> The base alignment of a structure is N, where N is the largest base
> alignment value of any of its members.
> 
> In this case the largest base alignment is 8 (which is mat2's base alignment
> following std430 rules), so 52 is rounded up to 56, not to 64.
> 
> Tested on NVIDIA proprietary driver version 352.21.
> 
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
> ---
>  tests/spec/arb_shader_storage_buffer_object/program-interface-query.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c b/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c
> index 2044898..68cbbff 100644
> --- a/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c
> +++ b/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c
> @@ -110,7 +110,7 @@ piglit_init(int argc, char **argv)
>  	const int expected_std140[NUM_QUERIES] =
>  		{ 0, 112, GL_FLOAT_MAT2, 3, 0, 16, 32, 16, 1, 1, 0 };
>  	const int expected_std430[NUM_QUERIES] =
> -		{ 2, 64, GL_FLOAT_MAT2, 3, 2, 16, 16, 8, 0, 0, 1 };
> +		{ 2, 56, GL_FLOAT_MAT2, 3, 2, 16, 16, 8, 0, 0, 1 };
>  	int i;
>  
>  	piglit_require_extension("GL_ARB_shader_storage_buffer_object");
> 



More information about the Piglit mailing list