Mesa (master): i965: Check eu/subslices are > 0

Ben Widawsky bwidawsk at kemper.freedesktop.org
Fri Apr 8 18:53:46 UTC 2016


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

Author: Ben Widawsky <benjamin.widawsky at intel.com>
Date:   Thu Apr  7 10:53:14 2016 -0700

i965: Check eu/subslices are > 0

Now that the check is restricted to gen8+, we should always get back a non-zero
positive value for the EU and subslice counts.

Signed-off-by: Ben Widawsky <benjamin.widawsky at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index b596017..03e6852 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1101,7 +1101,7 @@ intel_detect_sseu(struct intel_screen *intelScreen)
     * and we have to use conservative numbers for GPGPU on many platforms, but
     * otherwise, things will just work.
     */
-   if (intelScreen->subslice_total == -1 || intelScreen->eu_total == -1)
+   if (intelScreen->subslice_total < 1 || intelScreen->eu_total < 1)
       _mesa_warning(NULL,
                     "Kernel 4.1 required to properly query GPU properties.\n");
 




More information about the mesa-commit mailing list