I've been having a hell of a time trying to get GLSL shaders to run as SPIRV modules using ARB_gl_spirv.
I've posted at length about it here but to summarise..
1. The drivers fail to report
GL_SHADER_BINARY_FORMAT_SPIR_V when querying
2. Even when I know my shader is invalid, they seems to pass all validation checks, no errors or warnings are reported by getProgramInfoLog() or getShaderInfoLog()
3. Even the simplest of shaders will render only a black screen. Those shaders run just fine when loaded/compiled at runtime as GLSL instead of SPIRV.
4. Linux drivers will segfault somewhere in the middle of glLinkProgram() unless I slowwwwwly step through the code. Seems like a race condition when consecutively loading shaders.
5. It seems necessary to avoid calling glDetachShader() or the drivers will seemingly crash in all kinds of places.
Please know that I am:
- Specifying explicit attribute in/out locations
- Making use of uniform blocks instead of regular uniform variables
RenderDoc is able to see VS Input, but shows nothing on VS output
Incidentally, it's perhaps important to note that these very same SPIRV shaders run absolutely fine on AMD Linux drivers. They also render just fine on Intel drivers (both WIndows and Linux).
I'm using driver revision 20.7.2 (11/07/2020) with an RX 580
Is SPIRV support on OpenGL simply not as well supported as I had expected? Or am I doing something fundamentally wrong?
Any advice much appreciated. Thanks.
P.S. I know this belongs in the Developer community, it seems I need to be whitelisted before I can post there.