Hi. I originally asked on the WebGL mailing list at Khronos and was directed here. The original thread, for context, is located here [0]
I am trying to use KHR_parallel_shader_compile in my WebGL app, and am running into a program stall when calling useProgram(). According to engineers on the thread there, the only thing that should cause this is dynamic recompilation, but I don't believe I'm doing anything that would cause that. If I am, however, please let me know what hazards I should avoid. And for the future, having a log message or debug callback that would tell me about bad performance hazards would be appreciated.
If you would like to help test this yourself, please use an extremely recent Chrome Canary, and make sure the flag at chrome://flags/#enable-webgl-draft-extensions is enabled. Reproduction instructions are as follows:
- Navigate to https://noclip.website/#mkwii/beginner_course
- Wait for the full scene
to load.
- On the left, the button
under the file picker should be labeled “Render Hacks”. Open that panel
and toggle Enable Vertex Colors or Enable Textures. This causes all the
shaders in the scene to recompile.
- There should be a bit of
CPU time spent that, when analyzed in the Profiler, appears to be caused by useProgram.