[Mesa-dev] [PATCH] mesa/meta: check for signed/unsigned int conversion for pbo getteximage
Dave Airlie
airlied at gmail.com
Tue May 10 05:44:42 UTC 2016
On 10 May 2016 at 15:43, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> When doing GetTexSubImage using a PBO, we should check if it involves
> a signed/unsigned conversion and bail if it does, just like in the
> other cases.
>
> This fixes:
> GL33-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pbo
> on Haswell at least.
This is also a bug I filed yesterday:
https://bugs.freedesktop.org/show_bug.cgi?id=95324
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/drivers/common/meta_tex_subimage.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
> index 62c3fce..c140051 100644
> --- a/src/mesa/drivers/common/meta_tex_subimage.c
> +++ b/src/mesa/drivers/common/meta_tex_subimage.c
> @@ -355,8 +355,10 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
> */
> if (need_signed_unsigned_int_conversion(rb->Format, format, type))
> return false;
> + } else {
> + if (need_signed_unsigned_int_conversion(tex_image->TexFormat, format, type))
> + return false;
> }
> -
> /* For arrays, use a tall (height * depth) 2D texture but taking into
> * account the inter-image padding specified with the image height packing
> * property.
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list