KhronosGroup / KhronosGroup/glslang
Access `TIntermediate` with public headers
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
### Main issue
After calling `TShader::parse()` I have been using:
```cpp
shader->getIntermediate()->getNumEntryPoints();
shader->getIntermediate()->getNumErrors();
```
when converting HLSL to SPIRV because `TShader::parse()` sometimes still succeeded in some undesirable cases. For example when entry points don't exist. So I used `getIntermediate()` to do extra checking. But that's no longer possible since the removal of some public header files.
Is there another way to do this?
### Extra question
Another thing that I wasn't yet using, but was planning to in the future is `glslang::TIntermTraverser` to do some extra application-specific code checks.
```cpp
class MyTraverser : public glslang::TIntermTraverser { ... };
auto* root = shader->getIntermediate()->getTreeRoot();
MyTraverser traverser;
root->traverse(&traverser);
```
So I would also like to know if this is something that will not be possible or if this was removed by mistake.
Contributor guide
Research direction
Start by reviewing the public-header changes affecting TShader::getIntermediate() and the TIntermTraverser entry points shown in the issue. Determine whether supported access to intermediate data and traversal should be restored or replaced; done means the API behavior and application-facing alternative are clearly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100