[Mesa-stable] [Mesa-dev] [PATCH 4/5] meta: Fix datatype computation in get_temp_image_type()

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon Aug 4 02:34:25 PDT 2014


On Wed, Jul 30, 2014 at 07:11:26PM -0700, Anuj Phogat wrote:
> Changes in the patch will cause datatype to be computed
> correctly for 8 and 16 bit integer formats. For example:
> GL_RG8I, GL_RG16I etc.
> 
> Fixes many failures in gles3 Khronos CTS test:
> copy_tex_image_conversions_required
> copy_tex_image_conversions_forbidden

Is this a regression caused by the patch number two or already broken? If
the former than we should merge them. Otherwise:

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

> 
> Cc: <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/mesa/drivers/common/meta.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index edddd94..fdac546 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -2734,15 +2734,14 @@ get_temp_image_type(struct gl_context *ctx, mesa_format format)
>     case GL_LUMINANCE:
>     case GL_LUMINANCE_ALPHA:
>     case GL_INTENSITY:
> -      if (format_red_bits <= 8) {
> +      if (datatype == GL_INT || datatype == GL_UNSIGNED_INT) {
> +         return datatype;
> +      } else if (format_red_bits <= 8) {
>           return GL_UNSIGNED_BYTE;
>        } else if (format_red_bits <= 16) {
>           return GL_UNSIGNED_SHORT;
> -      } else {
> -         if (datatype == GL_INT || datatype == GL_UNSIGNED_INT)
> -            return datatype;
> -         return GL_FLOAT;
>        }
> +      return GL_FLOAT;
>     case GL_DEPTH_COMPONENT:
>        if (datatype == GL_FLOAT)
>           return GL_FLOAT;
> -- 
> 1.9.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list