summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_batchbuffer.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-03-05 12:40:45 -0800
committerEric Anholt <eric@anholt.net>2010-03-05 15:23:30 -0800
commit342a7f23bf76e21b049cba9ab97bf4aa640a5bfd (patch)
tree942d33931f6d064c6df4b5b7b102ebf7cb3f1f22 /src/mesa/drivers/dri/intel/intel_batchbuffer.c
parent8a9d8bd52af4414e59320c68238b8929edf3ff80 (diff)
intel: Move the assertions about reloc delta from the macros to the function.
Cuts another 1800 bytes from the driver.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_batchbuffer.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index a7bfd62b28..9768b0deee 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -210,6 +210,8 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
{
int ret;
+ assert(delta < buffer->size);
+
if (batch->ptr - batch->map > batch->buf->size)
printf ("bad relocation ptr %p map %p offset %d size %lu\n",
batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
@@ -234,6 +236,8 @@ intel_batchbuffer_emit_reloc_fenced(struct intel_batchbuffer *batch,
{
int ret;
+ assert(delta < buffer->size);
+
if (batch->ptr - batch->map > batch->buf->size)
printf ("bad relocation ptr %p map %p offset %d size %lu\n",
batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);