i965: Set subslice_total on Gen7/7.5 platforms.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 9 Jun 2016 06:36:16 +0000 (23:36 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 12 Jun 2016 07:38:47 +0000 (00:38 -0700)
We'll use this for compute shader thread counts and scratch space
calculations shortly.

Note that subslices are referred to as "half slices" on Ivybridge.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/intel_screen.c

index aa072fa76acf9f4ac2164a11f75c3493dab7cc4c..869119bb739790986056b844f9c82c9806e21afd 100644 (file)
@@ -1567,8 +1567,11 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
    intelScreen->hw_has_timestamp = intel_detect_timestamp(intelScreen);
 
    /* GENs prior to 8 do not support EU/Subslice info */
-   if (intelScreen->devinfo->gen >= 8)
+   if (intelScreen->devinfo->gen >= 8) {
       intel_detect_sseu(intelScreen);
+   } else if (intelScreen->devinfo->gen == 7) {
+      intelScreen->subslice_total = 1 << (intelScreen->devinfo->gt - 1);
+   }
 
    const char *force_msaa = getenv("INTEL_FORCE_MSAA");
    if (force_msaa) {