Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 1 of 1

Thread: GLSL -> SPIR-V -> OpenGL

  1. #1
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004

    GLSL -> SPIR-V -> OpenGL

    I'm curious if anyone has experience with precompiling GLSL to SPIR-V, and then feeding in those SPIR-V shader modules to OpenGL drivers for one or more GPU vendors.

    If so...:
    • what GLSL-to-SPIR-V precompiler did you use (e.g. glslang),
    • did you run into any problems with precompiling (unsupported GLSL features/extensions/etc.),
    • what GPU vendors' GL drivers have you tried this with,
    • did you notice much of a performance hit with glShaderBinary() or glSpecializeShader() (in OpenGL 4.6; see ARB_gl_spirv and ARB_get_program_binary).
    • any other advice you could give to others based on your experience?

    I'm actually wondering whether this might be a reasonable path to help avoid some of first-time GLSL shader compilation cost associated with feeding GLSL source code to GL drivers at runtime, but yet provide some measure of cross-platform/-GPU/-driver-version support for the precompiled "binaries" fed into the GLSL driver. I'm also curious whether this path might bypass some/all of the cost of dynamic shader reoptimization (aka shader patching) that sometimes occurs at runtime when you're rendering, which is extremely bad for users of high-performance OpenGL applications.

    (Looks like Sascha Williams has played with this a bit (LINK), but I didn't see much else out there.)
    Last edited by Dark Photon; 01-11-2018 at 07:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts