Bugs with GL_ARB_parallel_shader_compile

Hi Arthur,

That is the expected output, which indicates that there is a bug.

The line that says “Error: Shader compilation finished immediately!” Indicates that the glGetShaderiv with GL_COMPLETION_STATUS_KHR is halting execution until shader compilation completes. You may think that it’s just that the shaders are trivial. But if you change line 74 / 76 to use the “big” shaders you can clearly see the application hang and then print that error message (Indicating it is hanging on the supposedly non-blocking call GL_COMPLETION_STATUS_KHR).

Also it appears your linking is completing immediately. I suspect this is the second time you ran this test program? Reminder that shader’s get cached, so you’ll need to either delete your shader cache, or (what I do) add a comment inside the shader to invalidate the hash check and force shader recompilation. You should see a “Program still linking!” on your first run that indicates glGetProgramiv with GL_COMPLETION_STATUS_KHR is behaving as expected (See expected output in Readme.md).

If it helps, the spec for this extension is described: https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_parallel_shader_compile.txt

Sorry the test program isn’t more unit-test formatted. If you’d like for me to explain / discuss anything over some voicechat we can arrange that over PM’s.