summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-08 12:07:28 +0000
committerChris Wilson <ickle@crestline.(none)>2011-12-08 12:10:12 +0000
commit874c722c86b06ac0aa10e6943d3faf76fcb751be (patch)
tree251469dfa927a7adbca870c1f053dc44c309adc3
parent6ccb114a7e685c69fb388ebd119393455b315c36 (diff)
sna: Beware flushing partial buffers before they are written
A partial buffer is considered finished upon the next batch submission, so one needs to be careful that it is completely written to before such an event is triggered. move-to-cpu is such a trigger as demonstrated by the picture fixup routine for handling convolution filters. Reported-by: Victor Machado <machado.prx@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43607 Signed-off-by: Chris Wilson <ickle@crestline.(none)>
-rw-r--r--src/sna/sna_render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index cf227c6e..13c0526d 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -900,6 +900,9 @@ sna_render_picture_fixup(struct sna *sna,
__FUNCTION__, channel->pict_format, pitch, picture->format));
}
+ if (picture->pDrawable)
+ sna_drawable_move_to_cpu(picture->pDrawable, false);
+
channel->bo = kgem_create_buffer(&sna->kgem,
pitch*h, KGEM_BUFFER_WRITE,
&ptr);
@@ -923,9 +926,6 @@ sna_render_picture_fixup(struct sna *sna,
return 0;
}
- if (picture->pDrawable)
- sna_drawable_move_to_cpu(picture->pDrawable, false);
-
src = image_from_pict(picture, FALSE, &dx, &dy);
if (src == NULL) {
pixman_image_unref(dst);