Skip to content
Snippets Groups Projects
Commit 9b3ed4c8 authored by Emma Anholt's avatar Emma Anholt Committed by Carl Worth
Browse files

i965: Fix handling of MESA_pack_invert in blit (PBO) readpixels.


Fixes piglit GL_MESA_pack_invert/readpixels and GPU hangs with glamor and
cairo-gl.

Cc: 10.0 9.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Reviewed-by: default avatarAnuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit e186b927)
parent 38235d29
No related branches found
No related tags found
No related merge requests found
...@@ -106,13 +106,15 @@ do_blit_readpixels(struct gl_context * ctx, ...@@ -106,13 +106,15 @@ do_blit_readpixels(struct gl_context * ctx,
/* Mesa flips the dst_stride for pack->Invert, but we want our mt to have a /* Mesa flips the dst_stride for pack->Invert, but we want our mt to have a
* normal dst_stride. * normal dst_stride.
*/ */
struct gl_pixelstore_attrib uninverted_pack = *pack;
if (pack->Invert) { if (pack->Invert) {
dst_stride = -dst_stride; dst_stride = -dst_stride;
dst_flip = true; dst_flip = true;
uninverted_pack.Invert = false;
} }
dst_offset = (GLintptr)pixels; dst_offset = (GLintptr)pixels;
dst_offset += _mesa_image_offset(2, pack, width, height, dst_offset += _mesa_image_offset(2, &uninverted_pack, width, height,
format, type, 0, 0, 0); format, type, 0, 0, 0);
if (!_mesa_clip_copytexsubimage(ctx, if (!_mesa_clip_copytexsubimage(ctx,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment