summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_maos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_maos.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index 6b8365e6d9..259781389f 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -621,8 +621,12 @@ void r300UseArrays(GLcontext * ctx)
#ifdef HW_VBOS
-#define USE_VBO(a) if (ctx->Array.a.BufferObj->Name && ctx->Array.a.Enabled) \
- radeon_mm_use(rmesa, ((struct r300_buffer_object *)ctx->Array.a.BufferObj)->id)
+#define USE_VBO(a) \
+ do { \
+ if (ctx->Array.ArrayObj->a.BufferObj->Name \
+ && ctx->Array.ArrayObj->a.Enabled) \
+ radeon_mm_use(rmesa, ((struct r300_buffer_object *)ctx->Array.ArrayObj->a.BufferObj)->id); \
+ } while(0)
if (ctx->Array.ElementArrayBufferObj->Name && ctx->Array.ElementArrayBufferObj->OnCard)
radeon_mm_use(rmesa, ((struct r300_buffer_object *)ctx->Array.ElementArrayBufferObj)->id);