Mesa (master): i965: Increase G4X default VS URB allocation to actually allow 32 threads.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jul 1 00:57:58 UTC 2009


Module: Mesa
Branch: master
Commit: c3499f6c66bf93d7752ea70a13bbbab3d2b2c288
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3499f6c66bf93d7752ea70a13bbbab3d2b2c288

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jun 30 14:26:06 2009 -0700

i965: Increase G4X default VS URB allocation to actually allow 32 threads.

This improves the performance of my GLSL demo by 30%.  It also fixes the
VS deadlock that ut2004 had, for reasons I can't explain. Bug #21330.

---

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

diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index 7673dd3..47bc45c 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -143,7 +143,19 @@ static void recalculate_urb_fence( struct brw_context *brw )
       brw->urb.nr_clip_entries = limits[CLP].preferred_nr_entries;
       brw->urb.nr_sf_entries = limits[SF].preferred_nr_entries;	
       brw->urb.nr_cs_entries = limits[CS].preferred_nr_entries;	
-      
+
+      brw->urb.constrained = 0;
+
+      if (BRW_IS_G4X(brw)) {
+	 brw->urb.nr_vs_entries = 64;
+	 if (check_urb_layout(brw)) {
+	    goto done;
+	 } else {
+	    brw->urb.constrained = 1;
+	    brw->urb.nr_vs_entries = limits[VS].preferred_nr_entries;
+	 }
+      }
+
       if (!check_urb_layout(brw)) {
 	 brw->urb.nr_vs_entries = limits[VS].min_nr_entries;	
 	 brw->urb.nr_gs_entries = limits[GS].min_nr_entries;	
@@ -169,9 +181,8 @@ static void recalculate_urb_fence( struct brw_context *brw )
 	 if (INTEL_DEBUG & (DEBUG_URB|DEBUG_FALLBACKS))
 	    _mesa_printf("URB CONSTRAINED\n");
       }
-      else 
-	 brw->urb.constrained = 0;
 
+done:
       if (INTEL_DEBUG & DEBUG_URB)
 	 _mesa_printf("URB fence: %d ..VS.. %d ..GS.. %d ..CLP.. %d ..SF.. %d ..CS.. %d\n",
 		      brw->urb.vs_start,




More information about the mesa-commit mailing list