Mesa (master): i915g: Check relocs as well
Jakob Bornecrantz
wallbraker at kemper.freedesktop.org
Wed Aug 12 02:03:58 UTC 2009
Module: Mesa
Branch: master
Commit: df9f27822e90dec6b31e6c9b4c3478fd06ed9cc0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=df9f27822e90dec6b31e6c9b4c3478fd06ed9cc0
Author: Jakob Bornecrantz <wallbraker at gmail.com>
Date: Sat Aug 8 17:19:43 2009 +0200
i915g: Check relocs as well
---
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 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
More information about the mesa-commit
mailing list