[Mesa-dev] [PATCH V3 03/10] mesa: Add error condition for integer formats in glGetTexImage()

Carl Worth cworth at cworth.org
Mon Apr 21 11:42:23 PDT 2014


Anuj Phogat <anuj.phogat at gmail.com> writes:
> OpenGL 4.0 spec, page 306 suggests an INVALID_OPERATION in glGetTexImage
> if :
>    "format is one of the integer formats in table 3.3 and the internal
>     format of the texture image is not integer, or format is not one of
>     the integer formats in table 3.3 and the internal format is integer."
...
> +   else if (_mesa_is_enum_format_integer(format) !=
> +            _mesa_is_format_integer(texImage->TexFormat)) {
> +      _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)");
> +      return GL_TRUE;
> +   }

I need some clarification of this patch for purposes of the stable
branch.

Without this error case present, how would a program with an incorrect
format behave?

If it would previously function, then I think this patch should be
skipped for the stable branch, (to avoid regressing such programs).

If it would previously fail in some way, (such as a crash), but will now
fail more cleanly with the error, then I can accept this patch for the
stable branch.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140421/13414f10/attachment.sig>


More information about the mesa-dev mailing list