iris: Enable threaded shader compilation
There are a couple minor things that can be improved: 1. Eliminate (or reduce) the dynamic allocation of the threaded_compile_job. 2. For apps like shader-db, improve the case where nr_threads=0. Right now this adds thread switching and mutex overhead. 3. Other performance improvements? iris_uncompiled_shader::variants has some special properties that make it ripe for replacement with a lockless list. Without gathering some data, it's hard to guess what impact that could have. v2: Fix whitespace and formatting issues. Noticed by Ken. s/threaded_compile_job/iris_threaded_compile_job/g. Suggested by Ken. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11229>
This commit is contained in:
@@ -412,6 +412,9 @@ struct iris_uncompiled_shader {
|
||||
|
||||
/** Lock for the variants list */
|
||||
simple_mtx_t lock;
|
||||
|
||||
/** For parallel shader compiles */
|
||||
struct util_queue_fence ready;
|
||||
};
|
||||
|
||||
enum iris_surface_group {
|
||||
|
Reference in New Issue
Block a user