KhronosGroup / KhronosGroup/glslang

Specialization constant reflections

Open
#1,775 0 comments 0 reactions 0 assignees View on GitHub
enhancement GLSL/ESSL
Dominant language
C++
Stars
3.6k
Forks
989
Avg merge
1d 2h
Merged PRs (30d)
31

Description

I have a glsl shader program with the following constants:
```glsl
layout (constant_id = 0) const int VALUE_A = 10;
layout (constant_id = 1) const float VALUE_B = 11.7f;
```
I'm trying to get these in a reflection so I can build my VkSpecializationInfo objects on the fly. I cannot find any specialization constants contained in the `glslang::TProgram` reflection.
Am I looking in the wrong spot or are the reflection of these layouts not supported yet?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the glslang::TProgram reflection API for the GLSL specialization-constant declarations shown in the issue. Compare its reflected data with the expected VkSpecializationInfo inputs and verify behavior using a shader containing VALUE_A and VALUE_B. Done means the reflection exposes both constants, or clearly documents that they are unsupported.

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.