NEW 251514
KHR_parallel_shader_compile does not allow for shader compilation without blocking
https://bugs.webkit.org/show_bug.cgi?id=251514
Summary KHR_parallel_shader_compile does not allow for shader compilation without blo...
Martin
Reported 2023-02-01 07:30:36 PST
- longer write up is here: https://github.com/mvaligursky/webgl-parallel_shader_compile - repro: https://htmlpreview.github.io/?https://github.com/mvaligursky/webgl-parallel_shader_compile/blob/main/index.html Basically, I have a small example that compiles 50 larger shaders, while waiting for the results using the KHR_parallel_shader_compile extension, which is reported as supported. The problem is that even though this extension seems to work (meaning it does not block), the linkShader step is where all shader compilation seems to take place, and that is a blocking call, blocking the main thread till the shader is compiled. The idea behind the extension is that both compile and link steps are fast, only passing data to the browser, which then compiles the shaders in the background without blocking, and allowing non-blocking query of the results. The goal here is to compile many shaders, which the main WebGL thread is not blocked at all (the triangle should smoothly rotate).
Attachments
Kenneth Russell
Comment 1 2023-02-01 11:14:27 PST
Note Chromium-side bug crbug.com/1412083 was also filed about this. Ultimately this might be a problem in ANGLE's implementation of the extension; we'd have to look.
Kimmo Kinnunen
Comment 2 2023-02-01 23:45:52 PST
Thanks. Reason is AFAICT just that parallel linking is not yet implemented in ANGLE Metal backend.
Radar WebKit Bug Importer
Comment 3 2023-02-08 07:31:17 PST
Kimmo Kinnunen
Comment 4 2023-03-23 01:17:25 PDT
*** Bug 243820 has been marked as a duplicate of this bug. ***
Kimmo Kinnunen
Comment 5 2023-03-23 01:17:31 PDT
*** Bug 223371 has been marked as a duplicate of this bug. ***
Kimmo Kinnunen
Comment 6 2023-03-23 01:17:42 PDT
*** Bug 223624 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.