KhronosGroup / KhronosGroup/glslang

Feature Request: Ability to supply GLSLang the list of available extensions

Open
#2,595 10 comments 1 reaction 0 assignees View on GitHub
enhancement GLSL/ESSL help wanted SPIR-V
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.