KhronosGroup / KhronosGroup/glslang
Feature Request: Ability to supply GLSLang the list of available extensions
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
Based on the question in #2594, and given in Godot we compile shaders in run-time instead of shipping them with the game (as it is a general purpose game engine), it would be immensely useful for us to be able to pass GLSLang (at least via API) the list of extensions that it should enable.
While I understand this can be made with our own API as macros, it completely beats the purpose of GLSL providing this mechanism and making it available in Vulkan. As far as I understand, GLSLang just assumes all extensions are enabled based on the base SPIR-V version they support, so we would like to make this information be faithful to what the hardware actually supports at the time of the shader being compiled.
I suppose this would be done by just passing GLSLang an optional list of const char* strings with the available extensions.
Contributor guide
Research direction
Start by reviewing the GLSLang API and the context from issue #2594, then trace how shader compilation currently determines enabled extensions. Define an optional API input for the available extension names and verify that compilation uses only the supplied hardware-supported extensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100