From 205871c76ad2e655a9180900359d8f9ac690a912 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 5 Nov 2009 17:42:13 +0000 Subject: i965g: use Elements in loops over arrays --- src/gallium/drivers/i965/brw_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/i965') 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); -- cgit v1.2.3