[Mesa-stable] [Mesa-dev] [PATCH 02/14] meta: Fix transfer operations check in meta pbo path for readpixels

Jason Ekstrand jason at jlekstrand.net
Tue Jun 16 21:13:05 PDT 2015


On Jun 16, 2015 11:15 AM, "Anuj Phogat" <anuj.phogat at gmail.com> wrote:
>
> Without this patch, arb_color_buffer_float-readpixels test fails, when
> forced to use meta pbo path.
>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/common/meta_tex_subimage.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta_tex_subimage.c
b/src/mesa/drivers/common/meta_tex_subimage.c
> index d2474f5..00364f8 100644
> --- a/src/mesa/drivers/common/meta_tex_subimage.c
> +++ b/src/mesa/drivers/common/meta_tex_subimage.c
> @@ -273,12 +273,14 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context
*ctx, GLuint dims,
>         format == GL_COLOR_INDEX)
>        return false;
>
> -   if (ctx->_ImageTransferState)
> -      return false;
> -
> -
> +   /* Don't use meta path for readpixels in below conditions. */

A more descriptive comment would be nice.

>     if (!tex_image) {
>        rb = ctx->ReadBuffer->_ColorReadBuffer;
> +
> +      if (_mesa_get_readpixels_transfer_ops(ctx, rb->Format, format,
> +                                            type, GL_FALSE))
> +         return false;
> +
>        if (_mesa_need_rgb_to_luminance_conversion(rb->Format, format))
>           return false;
>     }
> --
> 1.9.3
>
> _______________________________________________
> 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-stable/attachments/20150616/8ef700fc/attachment.html>


More information about the mesa-stable mailing list