From: Jakob Bornecrantz Date: Sat, 8 Aug 2009 15:19:43 +0000 (+0200) Subject: i915g: Check relocs as well X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df9f27822e90dec6b31e6c9b4c3478fd06ed9cc0;p=mesa.git i915g: Check relocs as well --- 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