Module: Mesa Branch: staging/22.2 Commit: bb48242766b1ac8aed698c7203b7e4c4a0c9978a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb48242766b1ac8aed698c7203b7e4c4a0c9978a
Author: Sviatoslav Peleshko <[email protected]> Date: Mon Aug 22 13:48:40 2022 +0300 iris: Always initialize shader compilation queue ready fence We use/delete this fence unconditionally, but it was initialized only when screen->precompile is set. Move the util_queue_fence_init call to the iris_create_uncompiled_shader to initialize it always. Fixes: 42c34e1a ("iris: Enable threaded shader compilation") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7074 Signed-off-by: Sviatoslav Peleshko <[email protected]> Tested-by: Yonggang Luo <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18182> (cherry picked from commit 0a0aa24b33c4a3d18426f09674ff67c23e71cfd2) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_program.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index ec025f6318f..7bfbdbb3de5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -11965,7 +11965,7 @@ "description": "iris: Always initialize shader compilation queue ready fence", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "42c34e1ac8da3a000087c02cfd9f6fcb83e84fbc" }, diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 1e9cbc4f755..f4898ae897f 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -1280,8 +1280,6 @@ iris_schedule_compile(struct iris_screen *screen, util_queue_execute_func execute) { - util_queue_fence_init(ready_fence); - struct util_async_debug_callback async_debug; if (dbg) { @@ -2456,6 +2454,7 @@ iris_create_uncompiled_shader(struct iris_screen *screen, pipe_reference_init(&ish->ref, 1); list_inithead(&ish->variants); simple_mtx_init(&ish->lock, mtx_plain); + util_queue_fence_init(&ish->ready); ish->uses_atomic_load_store = iris_uses_image_atomic(nir);
