From: Ian Romanick <ian.d.roman...@intel.com> --- src/mesa/drivers/dri/intel/intel_batchbuffer.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h index fb4134d..90dc0ed 100644 --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h @@ -57,9 +57,11 @@ static INLINE uint32_t float_as_int(float f) * be passed as structs rather than dwords, but that's a little bit of * work... */ -static INLINE GLint +static INLINE unsigned intel_batchbuffer_space(struct intel_context *intel) { + assert((intel->batch.state_batch_offset - intel->batch.reserved_space) + >= intel->batch.used*4); return (intel->batch.state_batch_offset - intel->batch.reserved_space) - intel->batch.used*4; } -- 1.7.4.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev