intel_init_bufmgr(struct intel_screen *intelScreen)
{
__DRIscreen *spriv = intelScreen->driScrnPriv;
+ bool devid_override = getenv("INTEL_DEVID_OVERRIDE") != NULL;
intelScreen->no_hw = getenv("INTEL_NO_HW") != NULL;
return false;
}
+ intelScreen->subslice_total = -1;
+ intelScreen->eu_total = -1;
+
+ /* Everything below this is for real hardware only */
+ if (intelScreen->no_hw || devid_override)
+ return true;
+
+ intel_get_param(spriv, I915_PARAM_SUBSLICE_TOTAL,
+ &intelScreen->subslice_total);
+ intel_get_param(spriv, I915_PARAM_EU_TOTAL, &intelScreen->eu_total);
+
+ /* Without this information, we cannot get the right Braswell brandstrings,
+ * 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)
+ _mesa_warning(NULL,
+ "Kernel 4.1 required to properly query GPU properties.\n");
+
return true;
}
* I915_PARAM_CMD_PARSER_VERSION parameter
*/
int cmd_parser_version;
- };
+
+ /**
+ * Number of subslices reported by the I915_PARAM_SUBSLICE_TOTAL parameter
+ */
+ int subslice_total;
+
+ /**
+ * Number of EUs reported by the I915_PARAM_EU_TOTAL parameter
+ */
+ int eu_total;
+};
extern void intelDestroyContext(__DRIcontext * driContextPriv);