[Mesa-dev] [PATCH 10/15] mesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3

Marek Olšák maraeo at gmail.com
Fri Jun 6 17:41:42 PDT 2014


Since this seems to be a GLES-only limitation, the patch should use
_mesa_is_gles3 or _mesa_is_gles.

Marek

On Sat, Jun 7, 2014 at 1:57 AM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
> Fixes few failures in gles3 Khronos CTS test: packed_pixels
>
> Cc: "10.2" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/mesa/main/teximage.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 03ebbd8..6474dba 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -2667,6 +2667,17 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
>                       "glCopyTexImage%dD(srgb usage mismatch)", dimensions);
>           return GL_TRUE;
>        }
> +
> +      /* Page 139, Table 3.15 of OpenGL ES 3.0 spec does not define ReadPixels
> +       * types for SNORM formats. Also, conversion to SNORM formats is not
> +       * allowed by Table 3.2 on Page 110.
> +       */
> +      if(_mesa_is_enum_format_snorm(internalFormat)) {
> +         _mesa_error(ctx, GL_INVALID_OPERATION,
> +                     "glCopyTexImage%dD(internalFormat=%s)", dimensions,
> +                     _mesa_lookup_enum_by_nr(internalFormat));
> +         return GL_TRUE;
> +      }
>     }
>
>     if (!_mesa_source_buffer_exists(ctx, baseFormat)) {
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list