Mesa (i965g-restart): i965g: fix order of calculation of brw->wm. nr_surfaces

Keith Whitwell keithw at kemper.freedesktop.org
Wed Nov 4 23:45:26 UTC 2009


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Wed Nov  4 23:41:30 2009 +0000

i965g: fix order of calculation of brw->wm.nr_surfaces

---

 src/gallium/drivers/i965/brw_wm_surface_state.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/i965/brw_wm_surface_state.c b/src/gallium/drivers/i965/brw_wm_surface_state.c
index 6c29db0..b055dde 100644
--- a/src/gallium/drivers/i965/brw_wm_surface_state.c
+++ b/src/gallium/drivers/i965/brw_wm_surface_state.c
@@ -215,14 +215,14 @@ static int prepare_wm_surfaces(struct brw_context *brw )
    }
 #endif
 
-   brw->sws->bo_unreference(brw->wm.bind_bo);
-   brw->wm.bind_bo = brw_wm_get_binding_table(brw);
-
    if (brw->wm.nr_surfaces != nr_surfaces) {
       brw->wm.nr_surfaces = nr_surfaces;
       brw->state.dirty.brw |= BRW_NEW_NR_WM_SURFACES;
    }
 
+   brw->sws->bo_unreference(brw->wm.bind_bo);
+   brw->wm.bind_bo = brw_wm_get_binding_table(brw);
+
    return 0;
 }
 




More information about the mesa-commit mailing list