KhronosGroup / KhronosGroup/Vulkan-Docs
How much of the in/out interface between shaders has to match?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
There seem to be two main ways to specify the user-defined in/out interface of a shader:
OpVariabledecorated with aLocation, with anOpTypePointertype, which then points to (possibly an array of) some other type (including anOpTypeStructdecorated withBlock).OpVariablenot decorated with aLocation, with anOpTypePointertype, which then points to (possibly an array of) anOpTypeStructdecorated withBlock, of which every member is decorated with aLocation.
If both sides of the interface of the first type, checking for a match seems pretty trivial: pair up the OpVariables by Location and Component and then check if everything else matches.
But for the second type it's less clear. Do only the members have to match individually? Can the members be in different orders, as long as members with the same Location still match? Can the output block have more members than the input? Can the OpVariable and OpTypePointer have different decorations, while the members themselves match? Can the second type even match with the first type, again as long as the members of the block have the same type and decorations as the individual variables in the other shader?
The spec says:
An output variable, block, or structure member in a given shader stage has an interface match with an input variable, block, or structure member in a subsequent shader stage [...]
...which seems to leave open the interpretation that only the structure members need to match individually, or that a variable can match with a structure member.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the cited shader interface-match wording in the Vulkan specification and resolve the listed cases for block members, ordering, decorations, and variable-to-member matching. Done means the specification explicitly defines which interface forms match and how matching is determined.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100