Mesa (master): radeonsi: automatically resize shader compiler thread queues when they are full
Marek Olšák
mareko at kemper.freedesktop.org
Mon Jul 17 15:13:25 UTC 2017
Module: Mesa
Branch: master
Commit: 9f320e0a387a1009c5218daf130b3b754a3c2800
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f320e0a387a1009c5218daf130b3b754a3c2800
Author: Marek Olšák <marek.olsak at amd.com>
Date: Mon Jul 10 22:16:26 2017 +0200
radeonsi: automatically resize shader compiler thread queues when they are full
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeonsi/si_pipe.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index e2ec37731f..4df60b698f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -961,21 +961,17 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
MIN2(num_threads, ARRAY_SIZE(sscreen->tm_low_priority));
if (!util_queue_init(&sscreen->shader_compiler_queue, "si_shader",
- 32, num_compiler_threads, 0)) {
+ 32, num_compiler_threads,
+ UTIL_QUEUE_INIT_RESIZE_IF_FULL)) {
si_destroy_shader_cache(sscreen);
FREE(sscreen);
return NULL;
}
- /* The queue must be large enough so that adding optimized shaders
- * doesn't stall draw calls when the queue is full. Especially varying
- * packing generates a very high volume of optimized shader compilation
- * jobs.
- */
if (!util_queue_init(&sscreen->shader_compiler_queue_low_priority,
"si_shader_low",
- 1024, num_compiler_threads,
- UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY)) {
+ 32, num_compiler_threads,
+ UTIL_QUEUE_INIT_RESIZE_IF_FULL)) {
si_destroy_shader_cache(sscreen);
FREE(sscreen);
return NULL;
More information about the mesa-commit
mailing list