KhronosGroup / KhronosGroup/Vulkan-Docs
VkDescriptorSet creation imposes requirements on pipeline stage visibility
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
## Problem Statement
Currently, `VkDescriptorSet` allocation requires a create info struct which references the `VkDescriptorSetLayout`. This implies that at the time of descriptor set creation, you must know the pipeline stage visibility you intend to use. This same descriptor set layout is also required when you create a pipeline.
However, this API decision has the consequence of preventing a descriptor set to be used with two layouts that are identical except for the pipeline stage visibility. IHVs generally recommend that descriptor stage visibility be set conservatively, and in other APIs, these visibility stages can be set at PSO creation time (instead of descriptor set creation time).
As a result, ISVs have two options. Either set the stage mask to the logical OR of all stages that descriptor set will be used in across all draws and dispatches, or recreate the same descriptor set with the slightly modified layout.
Ideally, ISVs would be able to create descriptor sets and specify a layout _without_ needing to worry about stage visibility.
## Proposal
The specification should be relaxed such that the descriptor set layouts _are allowed to mismatch_ between the descriptor set allocation and the pipeline provided that they are _compatible_. Compatibility between descriptor set layouts is a new concept proposed. Two dset layouts are compatible if they differ only in the pipeline stage visibility mask, and the mask used during pipeline creation is _more restricted_ than the mask used when creating the descriptor set.
This change has the advantage of requiring no API changes, but allowing some IHVs to adopt the more restricted visibility specified during pipeline creation. IHVs that don't wish to implement this functionality can continue to fallback on the visibility mask requested at descriptor set creation time.
Contributor guide
Research direction
Start with the VkDescriptorSet allocation, VkDescriptorSetLayout, and pipeline-creation requirements described in the issue. Compare the current specification rules for descriptor set layout compatibility with the proposed visibility-mask exception. Done means the specification clearly defines compatible layouts and the allowed relationship between allocation-time and pipeline-time masks.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100