summaryrefslogtreecommitdiff
path: root/src/sna/sna_render_inline.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-07 08:59:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-07 08:59:32 +0100
commitd2a26adc8e7b02aea204101f207f740bbde62414 (patch)
tree55275ebc590cc3f1b739f2699f756492719bbeb7 /src/sna/sna_render_inline.h
parent3680aa4976407886eb4be9878d5296d5a1fadccf (diff)
sna/gen2: Add a couple of assertions to track down a batch overflow
References: https://bugs.freedesktop.org/show_bug.cgi?id=55700 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render_inline.h')
-rw-r--r--src/sna/sna_render_inline.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_render_inline.h b/src/sna/sna_render_inline.h
index 216937a2..4c543179 100644
--- a/src/sna/sna_render_inline.h
+++ b/src/sna/sna_render_inline.h
@@ -47,6 +47,8 @@ static inline float pack_2s(int16_t x, int16_t y)
static inline int batch_space(struct sna *sna)
{
+ assert(sna->kgem.nbatch <= KGEM_BATCH_SIZE(kgem));
+ assert(sna->kgem.nbatch + KGEM_BATCH_RESERVED < sna->kgem.surface);
return sna->kgem.surface - sna->kgem.nbatch - KGEM_BATCH_RESERVED;
}