[Piglit] [PATCH] DSA: fix error value for *TextureSubImage* when target doesn't match

Ilia Mirkin imirkin at alum.mit.edu
Wed Apr 22 09:37:45 PDT 2015


>From the ARB_dsa spec:

    An INVALID_ENUM error is generated by *TexSubImage* if <target> does
    not match the command, as shown in table 8.subtarg.

    An INVALID_OPERATION error is generated by *TextureSubImage* if the
    effective target of <texture> does not match the command, as shown in
    table 8.subtarg.

Probably the source of the confusion? AFAIK a bunch of spec bugs were
filed about these little inconsistencies... (But I don't know exactly
what they were, no Khronos access for me.)

On Wed, Apr 22, 2015 at 11:25 AM, Arthur Huillet <arthur.huillet at free.fr> wrote:
> From: Arthur Huillet <ahuillet at nvidia.com>
>
> Section 8.6 of the OpenGL 4.5 compatibility specification states:
> "An INVALID_OPERATION error is generated by *TextureSubImage* if
> the effective target of texture does not match the command, as shown in ta-
> ble 8.23."
>
> Piglit was expecting INVALID_ENUM.
>
> Signed-off-by: Arthur Huillet <ahuillet at nvidia.com>
> ---
>  tests/spec/arb_direct_state_access/texture-errors.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/tests/spec/arb_direct_state_access/texture-errors.c b/tests/spec/arb_direct_state_access/texture-errors.c
> index c79fbc4..fa93ee4 100644
> --- a/tests/spec/arb_direct_state_access/texture-errors.c
> +++ b/tests/spec/arb_direct_state_access/texture-errors.c
> @@ -87,18 +87,22 @@ test_pos_and_sizes(void)
>         glCopyTextureSubImage2D(name, 2, 0, 0, 0, 0, 4, 4);
>         pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
>
> -       /* To test 1D and 3D entry points, let's try using the wrong functions. */
> +       /* To test 1D and 3D entry points, let's try using the wrong functions.
> +       Section 8.6 of the OpenGL 4.5 compatibility specification states:
> +       "An INVALID_OPERATION error is generated by *TextureSubImage* if
> +       the effective target of texture does not match the command, as shown
> +       in table 8.23."*/
>         glTextureSubImage1D(name, 0, 0, 4, GL_RGBA, GL_FLOAT, NULL);
> -       pass &= piglit_check_gl_error(GL_INVALID_ENUM);
> +       pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
>
>         glTextureSubImage3D(name, 0, 0, 0, 0, 4, 4, 4, GL_RGBA, GL_FLOAT, NULL);
> -       pass &= piglit_check_gl_error(GL_INVALID_ENUM);
> +       pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
>
>         glCopyTextureSubImage1D(name, 0, 0, 0, 0, 4);
> -       pass &= piglit_check_gl_error(GL_INVALID_ENUM);
> +       pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
>
>         glCopyTextureSubImage3D(name, 0, 0, 0, 0, 0, 0, 4, 4);
> -       pass &= piglit_check_gl_error(GL_INVALID_ENUM);
> +       pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
>
>         return pass;
>  }
> --
> 2.3.5
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list