Hi, This series implements basic multithreaded LLVM shader compilation in a minimally invasive way. (+51 lines of code in the main patch)
It doesn't help on-demand shader compilation, but it does improve loading and startup times by being able to saturate up to 4 CPU cores if given enough shaders to compile. A proper shader cache might make this redundant, but we don't have that now. Implementation: si_create_shader_selector doesn't compile main shader parts and geometry shaders, but instead schedules an async job that does that. si_shader_select (in a draw call) waits for the job to complete before assembling a shader variant from multiple binaries. Results: Loading times (using a stopwatch and multiple tries): Elemental Demo (black screen time): 10.45 -> 8.16 seconds (-2.29 s) Unigine Heaven (loading time): 13.4 -> 12.2 seconds (-1.2 s) Apitrace running times: DiRT Showdown: 101.3 - > 94 seconds (-7.3 seconds) Left 4 Dead 2: 37.5 -> 30 seconds (-7.5 seconds) Borderlands 2: 36.9 -> 36.1 seconds (-0.8 seconds) (the last one is an example of on-demand compilation) Please review. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev