i965: Maxinum the usage of urb space on SNB.
authorZou Nan hai <nanhai.zou@intel.com>
Wed, 2 Mar 2011 06:23:17 +0000 (14:23 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Wed, 2 Mar 2011 06:23:17 +0000 (14:23 +0800)
      SNB has 64k urb space, we only use piece of them.
      The more urb space we alloc,
      the more concurrent vs threads we can run.
      push the urb space usage to the limit.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
src/mesa/drivers/dri/i965/gen6_urb.c

index fc46c4cb79e3373eec99991dea33675d0c9b4bd6..57be50a445110f1746b2f5be5967dfacb6f67147 100644 (file)
 static void
 prepare_urb( struct brw_context *brw )
 {
-   brw->urb.nr_vs_entries = 24;
-   if (brw->gs.prog_bo)
-      brw->urb.nr_gs_entries = 4;
-   else
-      brw->urb.nr_gs_entries = 0;
+   brw->urb.nr_vs_entries = 256;
+   brw->urb.nr_gs_entries = 256;
+
    /* CACHE_NEW_VS_PROG */
    brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1);
 
-   /* Check that the number of URB rows (8 floats each) allocated is less
-    * than the URB space.
-    */
-   assert((brw->urb.nr_vs_entries +
-          brw->urb.nr_gs_entries) * brw->urb.vs_size * 8 < 64 * 1024);
+   if (256 * brw->urb.vs_size > 64 * 1024)
+          brw->urb.nr_vs_entries = brw->urb.nr_gs_entries = 
+               (64 * 1024 ) / brw->urb.vs_size;
 }
 
 static void