Mesa (staging/20.1): llvmpipe: compute shaders work better with all the threads.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 22 23:21:11 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 544697800ac4c6843da3644c000f6449b9ade738
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=544697800ac4c6843da3644c000f6449b9ade738

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu May 21 13:38:03 2020 +1000

llvmpipe: compute shaders work better with all the threads.

I got to benchmarking some vulkan compute benchmark and wondered
why my CPUs weren't being saturated, helps if you actually wake up
all the threads in the threadpool.

Fixes: 1b24e3ba756b (llvmpipe: add compute threadpool + mutex)

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5138>
(cherry picked from commit 22554e1fbc20d0f642e952fda13d8f2631a898eb)

---

 .pick_status.json                          | 2 +-
 src/gallium/drivers/llvmpipe/lp_cs_tpool.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 2e1ec5eea86..2401f88d4e8 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1039,7 +1039,7 @@
         "description": "llvmpipe: compute shaders work better with all the threads.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "1b24e3ba756ba4951086d0b1b351364acbd3af1d"
     },
diff --git a/src/gallium/drivers/llvmpipe/lp_cs_tpool.c b/src/gallium/drivers/llvmpipe/lp_cs_tpool.c
index 4a23b6a2a95..ea284468512 100644
--- a/src/gallium/drivers/llvmpipe/lp_cs_tpool.c
+++ b/src/gallium/drivers/llvmpipe/lp_cs_tpool.c
@@ -137,7 +137,7 @@ lp_cs_tpool_queue_task(struct lp_cs_tpool *pool,
 
    list_addtail(&task->list, &pool->workqueue);
 
-   cnd_signal(&pool->new_work);
+   cnd_broadcast(&pool->new_work);
    mtx_unlock(&pool->m);
    return task;
 }



More information about the mesa-commit mailing list