summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_batchbuffer.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-05-08 10:37:23 -0700
committerKeith Packard <keithp@keithp.com>2008-05-08 10:37:23 -0700
commitfda5687241f4ce5cab3bf2eac437b52d4b37dd10 (patch)
treec021ea15d9930006ca38af130024ab1e39ff76da /src/mesa/drivers/dri/intel/intel_batchbuffer.h
parent68a916183276f727948e73fe752ebf36ef9f8ba9 (diff)
[intel] intel_batchbuffer_flush using uninit 'used' to check for buffer empty
Make sure 'used' tracks the right value through the whole function. Also, use GLint for intel_batchbuffer_space in case we do bad things in the future.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_batchbuffer.h')
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index 7268bd59da..5e8b14b401 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -88,7 +88,7 @@ GLboolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
* be passed as structs rather than dwords, but that's a little bit of
* work...
*/
-static INLINE GLuint
+static INLINE GLint
intel_batchbuffer_space(struct intel_batchbuffer *batch)
{
return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map);