[Mesa-dev] [PATCH 1/3] i965: Fix max_wm_threads for gen8

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Wed Jan 21 10:17:34 PST 2015


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

max_wm_threads depends on the GT SKU on gen8. Update the values to
match the spec.

The max number of threads in 3DSTATE_PS is always programmed to 64
and the hardware internally scales that depending on the GT SKU. So
this doesn't change the max number of threads actually used, but it
does affect the scratch space calculation.

This is most important on CHV where the old value was too small, so
the amount of scratch space allocated wasn't sufficient to satisfy the
actual max number of threads used. On BDW GT1 and GT2 we reduce the
value to avoid overallocating the scratch space needlessly. BDW GT3
is unaffected.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 src/mesa/drivers/dri/i965/brw_device_info.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c
index 65942c2..2c3af66 100644
--- a/src/mesa/drivers/dri/i965/brw_device_info.c
+++ b/src/mesa/drivers/dri/i965/brw_device_info.c
@@ -198,11 +198,11 @@ static const struct brw_device_info brw_device_info_hsw_gt3 = {
    .has_llc = true,                                 \
    .has_pln = true,                                 \
    .max_vs_threads = 504,                           \
-   .max_gs_threads = 504,                           \
-   .max_wm_threads = 384                            \
+   .max_gs_threads = 504                            \
 
 static const struct brw_device_info brw_device_info_bdw_gt1 = {
    GEN8_FEATURES, .gt = 1,
+   .max_wm_threads = 128,
    .urb = {
       .size = 192,
       .min_vs_entries = 64,
@@ -213,6 +213,7 @@ static const struct brw_device_info brw_device_info_bdw_gt1 = {
 
 static const struct brw_device_info brw_device_info_bdw_gt2 = {
    GEN8_FEATURES, .gt = 2,
+   .max_wm_threads = 192,
    .urb = {
       .size = 384,
       .min_vs_entries = 64,
@@ -223,6 +224,7 @@ static const struct brw_device_info brw_device_info_bdw_gt2 = {
 
 static const struct brw_device_info brw_device_info_bdw_gt3 = {
    GEN8_FEATURES, .gt = 3,
+   .max_wm_threads = 384,
    .urb = {
       .size = 384,
       .min_vs_entries = 64,
@@ -239,7 +241,7 @@ static const struct brw_device_info brw_device_info_chv = {
    .has_llc = false,
    .max_vs_threads = 80,
    .max_gs_threads = 80,
-   .max_wm_threads = 102,
+   .max_wm_threads = 128,
    .urb = {
       .size = 128,
       .min_vs_entries = 64,
-- 
2.0.5



More information about the mesa-dev mailing list