intel/dev: setup 1024 GS urb entries for ADL-N
authorTapani Pälli <tapani.palli@intel.com>
Thu, 22 Dec 2022 09:03:30 +0000 (11:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 23 Dec 2022 09:51:01 +0000 (09:51 +0000)
v2: apply only for devices with less than 32 EUs (Lionel)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7942
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20414>

src/intel/dev/intel_device_info.c

index 0dc2a62c6dcb79a378974159131748f96b3c0fec..7711f85a1dbdabd045afc31775468fff3bec6319 100644 (file)
@@ -1849,6 +1849,22 @@ fixup_chv_device_info(struct intel_device_info *devinfo)
       memcpy(needle, bsw_model, 3);
 }
 
+static void
+fixup_adl_device_info(struct intel_device_info *devinfo)
+{
+   assert(devinfo->platform == INTEL_PLATFORM_ADL);
+   const uint32_t eu_total = intel_device_info_eu_total(devinfo);
+
+   if (eu_total >= 32)
+      return;
+
+   /* Fixes issues with:
+    * dEQP-GLES31.functional.geometry_shading.layered.render_with_default_layer_cubemap
+    * when running on ADL-N platform.
+    */
+   devinfo->urb.max_entries[MESA_SHADER_GEOMETRY] = 1024;
+}
+
 static void
 init_max_scratch_ids(struct intel_device_info *devinfo)
 {
@@ -2017,6 +2033,9 @@ intel_i915_get_device_info_from_fd(int fd, struct intel_device_info *devinfo)
    if (devinfo->platform == INTEL_PLATFORM_CHV)
       fixup_chv_device_info(devinfo);
 
+   if (devinfo->platform == INTEL_PLATFORM_ADL)
+      fixup_adl_device_info(devinfo);
+
    /* Broadwell PRM says:
     *
     *   "Before Gfx8, there was a historical configuration control field to