Mesa (gallium-0.2): i965: Fix copy'n'paste issue that made brw->urb. constrained useless.

Alan Hourihane alanh at kemper.freedesktop.org
Wed Nov 5 11:59:55 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: d758c48761a2be2a6c9b3d80f8fe06d32b5dd0d3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d758c48761a2be2a6c9b3d80f8fe06d32b5dd0d3

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Nov  2 11:49:46 2008 -0800

i965: Fix copy'n'paste issue that made brw->urb.constrained useless.

Also, add a comment explaining what brw->urb.constrained tries to do.

---

 src/mesa/drivers/dri/i965/brw_urb.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index 1116ade..1a00417 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -92,9 +92,9 @@ static void recalculate_urb_fence( struct brw_context *brw )
    if (brw->urb.vsize < vsize ||
        brw->urb.sfsize < sfsize ||
        brw->urb.csize < csize ||
-       (brw->urb.constrained && (brw->urb.vsize > brw->urb.vsize ||
-				 brw->urb.sfsize > brw->urb.sfsize ||
-				 brw->urb.csize > brw->urb.csize))) {
+       (brw->urb.constrained && (brw->urb.vsize > vsize ||
+				 brw->urb.sfsize > sfsize ||
+				 brw->urb.csize > csize))) {
       
 
       brw->urb.csize = csize;
@@ -114,6 +114,10 @@ static void recalculate_urb_fence( struct brw_context *brw )
 	 brw->urb.nr_sf_entries = limits[SF].min_nr_entries;	
 	 brw->urb.nr_cs_entries = limits[CS].min_nr_entries;	
 
+	 /* Mark us as operating with constrained nr_entries, so that next
+	  * time we recalculate we'll resize the fences in the hope of
+	  * escaping constrained mode and getting back to normal performance.
+	  */
 	 brw->urb.constrained = 1;
 	 
 	 if (!check_urb_layout(brw)) {




More information about the mesa-commit mailing list