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:
Ian Romanick
2021-06-04 14:17:42 -07:00
committed by Marge Bot
parent 9011cc7405
commit 42c34e1ac8
5 changed files with 135 additions and 6 deletions

View File

@@ -220,6 +220,8 @@ struct iris_screen {
struct iris_bo *workaround_bo;
struct iris_address workaround_address;
struct util_queue shader_compiler_queue;
struct disk_cache *disk_cache;
struct intel_measure_device measure;