On 01/28/2015 03:36 AM, Jason Ekstrand wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=88841
> ---
>  src/mesa/drivers/dri/i965/intel_pixel_read.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c 
> b/src/mesa/drivers/dri/i965/intel_pixel_read.c
> index babf8ca..198d616 100644
> --- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
> +++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
> @@ -155,6 +155,17 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
>  
>     dst_pitch = _mesa_image_row_stride(pack, width, format, type);
>  
> +   /* For a window-system renderbuffer, the buffer is actually flipped
> +    * vertically, so we need to handle that.  Because we don't want to
> +    * mess up the detiling, we mangle the height and pixels pointer and
> +    * give the detiling function a negative pitch.
> +    */
> +   if (rb->Name == 0) {
> +      yoffset = rb->Height - yoffset - height;
> +      pixels += (ptrdiff_t) (height - 1) * dst_pitch;
> +      dst_pitch = -dst_pitch;
> +   }
> +
>     /* We postponed printing this message until having committed to executing
>      * the function.
>      */
> 

Reviewed-by: Chad Versace <chad.vers...@intel.com>

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to