summaryrefslogtreecommitdiff
path: root/src/sna/gen3_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-29 13:03:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-29 13:10:34 +0100
commit264d1b1e1fb368f7845a8112bfa2ad2224acabd9 (patch)
treedee2a9916e29ec5df2cd74096666c8d7cb833217 /src/sna/gen3_render.c
parentc7bcca9a3fb6c669d8b093e6399914693770b0b3 (diff)
sna: Also check for a free exec slot for the upload buffers
As we check before allocating the upload buffer, we can not be certain that we will allocate an already attached bo or that we have a free exec slot. So always check that we have an extra exec slot available - the false positive rate is going to be negligible. Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50457 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r--src/sna/gen3_render.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index b8f09709..ee18ebe6 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -1792,11 +1792,8 @@ static int gen3_get_rectangles__flush(struct sna *sna,
{
if (!kgem_check_batch(&sna->kgem, op->need_magic_ca_pass ? 105: 5))
return 0;
- if (!kgem_check_exec(&sna->kgem, 1))
+ if (!kgem_check_reloc_and_exec(&sna->kgem, 1))
return 0;
- if (!kgem_check_reloc(&sna->kgem, 1))
- return 0;
-
if (op->need_magic_ca_pass && sna->render.vbo)
return 0;