[Piglit] [PATCH] arb_direct_state_access/create-textures: also check invalid zero target

Anuj Phogat anuj.phogat at gmail.com
Wed Oct 7 09:31:33 PDT 2015


On Oct 5, 2015 10:23 AM, "Brian Paul" <brianp at vmware.com> wrote:
>
> Check that glCreateTextures rejects target=0, per the spec.  Also, Mesa
> internally uses target=0 for a special state (texture gen'd but not bound)
> so it's good to test.
> ---
>  tests/spec/arb_direct_state_access/create-textures.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tests/spec/arb_direct_state_access/create-textures.c
b/tests/spec/arb_direct_state_access/create-textures.c
> index ca6d43c..5479844 100644
> --- a/tests/spec/arb_direct_state_access/create-textures.c
> +++ b/tests/spec/arb_direct_state_access/create-textures.c
> @@ -62,6 +62,10 @@ piglit_display(void)
>         glCreateTextures(GL_PROXY_TEXTURE_2D, 1, &name);
>         pass = piglit_check_gl_error(GL_INVALID_ENUM) && pass;
>
> +       /* Invalid zero target */
> +       glCreateTextures(0, 1, &name);
> +       pass = piglit_check_gl_error(GL_INVALID_ENUM) && pass;
> +
>         /* n is negative */
>         glCreateTextures(GL_TEXTURE_2D, -1, &name);
>         pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
> --
> 1.9.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151007/13b5c35f/attachment.html>


More information about the Piglit mailing list