Module: Mesa
Branch: i965g-restart
Commit: 205871c76ad2e655a9180900359d8f9ac690a912
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=205871c76ad2e655a9180900359d8f9ac690a912

Author: Keith Whitwell <kei...@vmware.com>
Date:   Thu Nov  5 17:42:13 2009 +0000

i965g: use Elements in loops over arrays

---

 src/gallium/drivers/i965/brw_context.c |    4 ++--
 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 2cee7a7..8e1421e 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);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to