summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2011-03-03 10:30:06 +0800
committerZou Nan hai <nanhai.zou@intel.com>2011-03-03 10:30:06 +0800
commit118ecb1a2226494929a87c36b7802b64451ca004 (patch)
treeeca786bce75256c9f44cc98a010d61e77c1868df /src/mesa/drivers/dri/i965
parent2e756f3d6f15d61297a3bb4efe6a88c29081a5eb (diff)
i965: SNB GT1 has only 32k urb and max 128 urb entries.
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_urb.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c
index 57be50a445..c3819f9b36 100644
--- a/src/mesa/drivers/dri/i965/gen6_urb.c
+++ b/src/mesa/drivers/dri/i965/gen6_urb.c
@@ -34,15 +34,26 @@
static void
prepare_urb( struct brw_context *brw )
{
- brw->urb.nr_vs_entries = 256;
- brw->urb.nr_gs_entries = 256;
+ int urb_size, max_urb_entry;
+ struct intel_context *intel = &brw->intel;
+
+ if (IS_GT1(intel->intelScreen->deviceID)) {
+ urb_size = 32 * 1024;
+ max_urb_entry = 128;
+ } else {
+ urb_size = 64 * 1024;
+ max_urb_entry = 256;
+ }
+
+ brw->urb.nr_vs_entries = max_urb_entry;
+ brw->urb.nr_gs_entries = max_urb_entry;
/* CACHE_NEW_VS_PROG */
brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1);
- if (256 * brw->urb.vs_size > 64 * 1024)
+ if (2 * brw->urb.vs_size > urb_size)
brw->urb.nr_vs_entries = brw->urb.nr_gs_entries =
- (64 * 1024 ) / brw->urb.vs_size;
+ (urb_size ) / (2 * brw->urb.vs_size);
}
static void