[Mesa-dev] [PATCH] mesa/copyimage: report INVALID_VALUE for missing cube array

Antía Puentes apuentes at igalia.com
Thu Jun 2 15:37:05 UTC 2016


On jue, 2016-06-02 at 14:25 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> The specs says INVALID_VALUE for exceeding dimensions,
> which is really what is happening here.
> 
> This fixes:
> GL45-CTS.copy_image.non_existent_mipmap
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/main/copyimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
> index 6aa6bcb..7e5df61 100644
> --- a/src/mesa/main/copyimage.c
> +++ b/src/mesa/main/copyimage.c
> @@ -180,7 +180,7 @@ prepare_target(struct gl_context *ctx, GLuint
> name, GLenum target,
>           for (i = 0; i < depth; i++) {
>              if (!texObj->Image[z+i][level]) {
>                 /* missing cube face */
> -               _mesa_error(ctx, GL_INVALID_OPERATION,
> +               _mesa_error(ctx, GL_INVALID_VALUE,
>                             "glCopyImageSubData(missing cube face)");

I would say "... missing cube face" in the commit message as this is
the error you are returning here. With this change,

Reviewed-by: Antia Puentes <apuentes at igalia.com>

>                 return false;
>              }


More information about the mesa-dev mailing list