[Mesa-dev] [PATCH 08/15] mesa: Fix condition for using compressed internalformat in glCompressedTexImage3D()

Jason Ekstrand jason at jlekstrand.net
Tue Jul 29 17:02:29 PDT 2014


Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>


On Fri, Jun 6, 2014 at 4:57 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:

> Cc: <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/mesa/main/teximage.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index b8627a3..03ebbd8 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -2262,7 +2262,14 @@ compressed_texture_error_check(struct gl_context
> *ctx, GLint dimensions,
>
>     if (!_mesa_target_can_be_compressed(ctx, target, internalFormat)) {
>        reason = "target";
> -      error = GL_INVALID_ENUM;
> +      /* From section 3.8.6, page 146 of OpenGL ES 3.0 spec:
> +       *
> +       *    "The ETC2/EAC texture compression algorithm supports only
> +       *     two-dimensional images. If internalformat is an ETC2/EAC
> format,
> +       *     CompressedTexImage3D will generate an INVALID_OPERATION
> error if
> +       *     target is not TEXTURE_2D_ARRAY."
> +       */
> +      error = _mesa_is_desktop_gl(ctx) ? GL_INVALID_ENUM :
> GL_INVALID_OPERATION;
>        goto error;
>     }
>
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140729/26d9488d/attachment.html>


More information about the mesa-dev mailing list