aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/i965/brw_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/i965/brw_context.c b/src/gallium/drivers/i965/brw_context.c
index 2cee7a7a3cf..8e1421e7386 100644
--- a/src/gallium/drivers/i965/brw_context.c
+++ b/src/gallium/drivers/i965/brw_context.c
@@ -85,12 +85,12 @@ static void brw_destroy_context( struct pipe_context *pipe )
bo_reference(&brw->sf.state_bo, NULL);
bo_reference(&brw->sf.vp_bo, NULL);
- for (i = 0; i < BRW_MAX_TEX_UNIT; i++)
+ for (i = 0; i < Elements(brw->wm.sdc_bo); i++)
bo_reference(&brw->wm.sdc_bo[i], NULL);
bo_reference(&brw->wm.bind_bo, NULL);
- for (i = 0; i < BRW_WM_MAX_SURF; i++)
+ for (i = 0; i < Elements(brw->wm.surf_bo); i++)
bo_reference(&brw->wm.surf_bo[i], NULL);
bo_reference(&brw->wm.sampler_bo, NULL);