27 lines
1.0 KiB
Markdown
27 lines
1.0 KiB
Markdown
|
|
Descriptor sets
|
|
===
|
|
- hardcoded in SDL_gpu
|
|
- for graphics pipelines there are always 4 of them:
|
|
- 0 are vertex resources (first samplers, then storage images, then storage buffers)
|
|
- 1 are vertex uniform buffers
|
|
- 2 are fragment resources (again samplers, storage images and storage buffers)
|
|
- 3 are fragment uniform buffers
|
|
- compute has 3 sets:
|
|
- 0 are read-only resources (samplers, storage images, storage buffers)
|
|
- 1 are write-only resources (storage images and storage buffers)
|
|
- 2 are uniform buffers
|
|
|
|
Cycling
|
|
===
|
|
- due to the nature of in-flight frames, resources might still be in use in a previous frames
|
|
- to make up for this, many SDL_gpu APIs have a `cycle` parameter
|
|
- if set to true, SDL will provide an unused resource if the previous one is still in use
|
|
|
|
First Look At The Resulting Vulkan Calls
|
|
===
|
|
- they are correct
|
|
- but not really optimal, e.g.
|
|
- double transitions
|
|
- transition for the depth attachment in pass without depth?
|
|
- vkCmdSetStencilReference even though there is no stencil buffer |