KhronosGroup / KhronosGroup/SPIRV-Cross
Support for multiple entry points in compilation output
- Dominant language
- GLSL
- Stars
- 2.5k
- Forks
- 713
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 16
Description
As far as I know, HLSL and MSL support multiple entry points. Although it appears each of the compiler backends only attempt to emit a single entry point. Is it planned to support multiple entry points in the compiled output in the future?
For example, the MSL compiler has fields such as [`entry_point_name`](https://github.com/KhronosGroup/SPIRV-Cross/blob/master/spirv_msl.hpp#L80) which is not valid if multiple entry points are available in the compiled MSL (and it would be a breaking change to fix this in the future). I was hoping to use this something like this to track entry point name maps to fix #316 until I realized only one entry point was supported.
Likewise [`set_entry_point`](https://github.com/KhronosGroup/SPIRV-Cross/blob/0cabdcb7c2261c717f95f80acee8510ad784a697/spirv_cross.hpp#L265) and any compiler methods that use information from the current entry point would be invalid. Although, it seems like many of these references are used to conditionally include some output based on the `ExecutionModel`, which might not be too difficult to change.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing spirv_msl.hpp, especially entry_point_name, and spirv_cross.hpp, especially set_entry_point, then trace compiler methods that use current-entry-point information. Done means compiled output can represent multiple entry points without relying on a single entry-point name.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100