From df9f27822e90dec6b31e6c9b4c3478fd06ed9cc0 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 8 Aug 2009 17:19:43 +0200 Subject: i915g: Check relocs as well --- src/gallium/drivers/i915simple/i915_batch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/i915simple/i915_batch.h b/src/gallium/drivers/i915simple/i915_batch.h index a433cf054de..c6e68ea38a2 100644 --- a/src/gallium/drivers/i915simple/i915_batch.h +++ b/src/gallium/drivers/i915simple/i915_batch.h @@ -50,8 +50,8 @@ i915_batchbuffer_check( struct i915_batchbuffer *batch, size_t dwords, size_t relocs ) { - /** TODO JB: Check relocs */ - return dwords * 4 <= batch->size - (batch->ptr - batch->map); + return dwords * 4 <= batch->size - (batch->ptr - batch->map) && + relocs <= (batch->max_relocs - batch->relocs); } static INLINE size_t -- cgit v1.2.3