From: Jakob Bornecrantz Date: Sat, 8 Aug 2009 15:19:43 +0000 (+0200) Subject: i915g: Check relocs as well X-Git-Tag: 062012170305~17094 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df9f27822e90dec6b31e6c9b4c3478fd06ed9cc0;p=profile%2Fivi%2Fmesa.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 a433cf0..c6e68ea 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