Mesa (main): intel/common: allocate space for at least one task urb

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 27 15:03:53 UTC 2022


Module: Mesa
Branch: main
Commit: 3dc6a98d78c669b28ee600b9da7086febb859e8f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3dc6a98d78c669b28ee600b9da7086febb859e8f

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Fri May  6 16:37:27 2022 +0200

intel/common: allocate space for at least one task urb

Fixes: c93cbc77f78 ("intel/common: Add helper for URB allocation in Mesh pipeline")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16196>

---

 src/intel/common/intel_urb_config.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/intel/common/intel_urb_config.c b/src/intel/common/intel_urb_config.c
index 04f25490dda..98d5686e101 100644
--- a/src/intel/common/intel_urb_config.c
+++ b/src/intel/common/intel_urb_config.c
@@ -338,7 +338,10 @@ intel_get_mesh_urb_config(const struct intel_device_info *devinfo,
       task_urb_share = task_urb_share_percentage / 100.0f;
    }
 
-   const unsigned task_urb_kb = ALIGN(total_urb_kb * task_urb_share, 8);
+   const unsigned one_task_urb_kb = ALIGN(r.task_entry_size_64b * 64, 1024) / 1024;
+
+   const unsigned task_urb_kb = ALIGN(MAX2(total_urb_kb * task_urb_share, one_task_urb_kb), 8);
+
    const unsigned mesh_urb_kb = total_urb_kb - task_urb_kb;
 
    /* TODO(mesh): Could we avoid allocating URB for Mesh if rasterization is



More information about the mesa-commit mailing list