diff options
author | Eric Anholt <[email protected]> | 2010-03-05 12:40:45 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-03-05 15:23:30 -0800 |
commit | 342a7f23bf76e21b049cba9ab97bf4aa640a5bfd (patch) | |
tree | 942d33931f6d064c6df4b5b7b102ebf7cb3f1f22 /src/mesa/drivers/dri/intel/intel_batchbuffer.c | |
parent | 8a9d8bd52af4414e59320c68238b8929edf3ff80 (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.c | 4 |
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 a7bfd62b285..9768b0deee7 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); |