summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <wallbraker@gmail.com>2009-08-08 17:19:43 +0200
committerJakob Bornecrantz <wallbraker@gmail.com>2009-08-12 03:58:37 +0200
commitdf9f27822e90dec6b31e6c9b4c3478fd06ed9cc0 (patch)
treecb0d44ad1792ad972eac04fcc9883b287d6e3454 /src
parent7a60ed20158bff84da6eed8aca511602d95fd5b5 (diff)
i915g: Check relocs as well
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/i915simple/i915_batch.h4
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 a433cf054d..c6e68ea38a 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