diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-19 00:34:12 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-19 00:37:43 +0000 |
commit | ae32aaf4b20dafef138dc9c28dbddbfe49f24b83 (patch) | |
tree | 8c57160aef5d89c8164a166b5394883535a00888 /src/sna/sna_render_inline.h | |
parent | e32ad646762ccc7f22f938454e222d43abfb38ed (diff) |
sna/gen[23]: We need to check the batch before doing an inline flush
A missing check before emitting a dword into the batch opened up the
possibility of overflowing the batch and corrupting our state.
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_render_inline.h b/src/sna/sna_render_inline.h index daa8f6fe..758833ed 100644 --- a/src/sna/sna_render_inline.h +++ b/src/sna/sna_render_inline.h @@ -52,7 +52,7 @@ static inline int batch_space(struct sna *sna) static inline void batch_emit(struct sna *sna, uint32_t dword) { - assert(sna->kgem.nbatch < sna->kgem.surface); + assert(sna->kgem.nbatch + KGEM_BATCH_RESERVED < sna->kgem.surface); sna->kgem.batch[sna->kgem.nbatch++] = dword; } |