Reviewed-by: Iago Toral Quiroga <ito...@igalia.com>

On Tue, 2015-09-01 at 16:41 +1000, Dave Airlie wrote:
> From: Dave Airlie <airl...@redhat.com>
> 
> The CTS packed_pixels test checks that readpixels doesn't write
> into the space between rows, however we fail that here unless
> we check the format and stride match.
> This fixes all the core mesa problems with CTS packed_pixels
> tests.
> 
> Signed-off-by: Dave Airlie <airl...@redhat.com>
> ---
>  src/mesa/main/readpix.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> index 0ef07b5..c57fbac 100644
> --- a/src/mesa/main/readpix.c
> +++ b/src/mesa/main/readpix.c
> @@ -523,7 +523,8 @@ read_rgba_pixels( struct gl_context *ctx,
>         * convert to, then we can convert directly into the dst buffer and 
> avoid
>         * the final conversion/copy from the rgba buffer to the dst buffer.
>         */
> -      if (dst_format == rgba_format) {
> +      if (dst_format == rgba_format &&
> +          dst_stride == rgba_stride) {
>           need_convert = false;
>           rgba = dst;
>        } else {


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to