KhronosGroup / GLSL

GLSL Shading Language Issue Tracker
328 stars 96 forks source link

Why not add support for spir-v in GLES? #175

Closed ylz-at closed 2 years ago

ylz-at commented 2 years ago

Currently, Vulkan can make use of SPIR-v in all platforms and OpenGL can do it via GL_SHADER_BINARY_FORMAT_SPIR_V。 But there is no such thing for GLES, any reason for this?

pdaniell-nv commented 2 years ago

Thus far there hasn't been any demand for using SPIR-V with OpenGL ES. It would likely be a lot of work for ES implementations to add support, What use cases do you have in mind?

ylz-at commented 2 years ago

We have over 3000 GLSL shaders in our game project, most of them(around 800) should be compiled on gamers' phones when loading a scene. Our scene takes quite a few time to load and phone gets hot as the compiling task runs on "Gold Cores" which might even lead to CPU downclocking. Providing shader binary is not ideal for us, as it is difficult to cover most of the android devices/drivers.

pdaniell-nv commented 2 years ago

Compilation speed of SPIR-V is not that much faster than GLSL, definitely not an order of magnitude, which it sounds like you need. I think you'll need to come up with a caching scheme.

ylz-at commented 2 years ago

Thank you for answering.