[Piglit] [PATCH] arb_uniform_buffer_object: fix UNIFORM_BUFFER_START and UNIFORM_BUFFER_SIZE queries when no buffer object is bound

Kristian Høgsberg krh at bitplanet.net
Tue Sep 15 09:54:41 PDT 2015


On Wed, May 13, 2015 at 11:56 PM, Samuel Iglesias Gonsalvez
<siglesias at igalia.com> wrote:
> According to ARB_uniform_buffer_object spec:
>
>     "If the parameter (starting offset or size) was not specified when the
>      buffer object was bound (e.g. if bound with BindBufferBase), or if no
>      buffer object is bound to <index>, zero is returned."
>
> Tested on NVIDIA's proprietary driver version 340.65 and ATI proprietary
> driver version 13.35.1005.
>
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>

In particular, this seems to have changed in v64 of the spec:

    (v64, 2011-01-27, jon)
        - Change return value for start/size queries when no buffer
          bound from -1 to zero, to match state tables (Bug 7318).

Section 6.7.1 of the GL4.0 spec also confirms this.

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> ---
>  tests/spec/arb_uniform_buffer_object/getintegeri_v.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_uniform_buffer_object/getintegeri_v.c b/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
> index d1b685f..9ed5fcc 100644
> --- a/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
> +++ b/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
> @@ -79,7 +79,7 @@ piglit_init(int argc, char **argv)
>
>         piglit_require_extension("GL_ARB_uniform_buffer_object");
>
> -       test_range(__LINE__, 0, 0, -1, -1);
> +       test_range(__LINE__, 0, 0, 0, 0);
>
>         glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &alignment);
>
> @@ -117,7 +117,7 @@ piglit_init(int argc, char **argv)
>          * of the GL API, including glBindBuffer(), to allow it
>          */
>         glBindBufferBase(GL_UNIFORM_BUFFER, 0, 0);
> -       test_range(__LINE__, 0, 0, -1, -1);
> +       test_range(__LINE__, 0, 0, 0, 0);
>
>         /* Test the error condition. */
>         glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &max_bindings);
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list