[Piglit] [PATCH 1/2] arb_shader_image_load_store/host-mem-barrier: Skip UBO/RaW test if the required UBO size is unsupported.

Jordan Justen jordan.l.justen at intel.com
Fri Jul 24 11:20:42 PDT 2015


Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On 2015-07-24 11:01:46, Francisco Jerez wrote:
> This test assumes it can bind a UBO of size larger than the minimum
> maximum guaranteed by the GL standard, what recently started causing
> failures unrelated to ARB_shader_image_load_store since Mesa became
> more strict about shaders declaring UBOs of unsupported size
> (f734d2556013e9239e91f43b563b5b1d8f03ada4).  Skip it if the
> implementation doesn't support the size we want.
> ---
>  tests/spec/arb_shader_image_load_store/host-mem-barrier.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/spec/arb_shader_image_load_store/host-mem-barrier.c b/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
> index 9727ddc..833d7ec 100644
> --- a/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
> +++ b/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
> @@ -250,6 +250,14 @@ run_test_element_array_raw(const struct image_barrier_info *bar, unsigned l)
>  }
>  
>  static bool
> +can_test_ubo_raw(void)
> +{
> +   int size = 0;
> +   glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &size);
> +   return size >= 16 * N;
> +}
> +
> +static bool
>  run_test_ubo_raw(const struct image_barrier_info *bar, unsigned l)
>  {
>          const struct grid_info grid =
> @@ -995,7 +1003,8 @@ piglit_init(int argc, char **argv)
>                          barrier_subtest(&status, true, run_test_element_array_raw,
>                                          "Element array/RaW", bar, l);
>  
> -                        barrier_subtest(&status, true, run_test_ubo_raw,
> +                        barrier_subtest(&status, can_test_ubo_raw(),
> +                                        run_test_ubo_raw,
>                                          "Uniform buffer/RaW", bar, l);
>  
>                          barrier_subtest(&status, true, run_test_tex_fetch_raw,
> -- 
> 2.4.3
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list