i965: Check eu/subslices are > 0
authorBen Widawsky <benjamin.widawsky@intel.com>
Thu, 7 Apr 2016 17:53:14 +0000 (10:53 -0700)
committerBen Widawsky <benjamin.widawsky@intel.com>
Fri, 8 Apr 2016 18:52:29 +0000 (11:52 -0700)
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@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_screen.c

index b596017c65494fb9a6b3cbe453d5df272bfd31b0..03e6852a7f11656ce73fd5fa39b996ee6d559e73 100644 (file)
@@ -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");