diff options
author | Jakob Bornecrantz <[email protected]> | 2009-08-08 17:19:43 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-08-12 03:58:37 +0200 |
commit | df9f27822e90dec6b31e6c9b4c3478fd06ed9cc0 (patch) | |
tree | cb0d44ad1792ad972eac04fcc9883b287d6e3454 /src | |
parent | 7a60ed20158bff84da6eed8aca511602d95fd5b5 (diff) |
i915g: Check relocs as well
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/i915simple/i915_batch.h | 4 |
1 files 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 |