Skip to content

Share descriptor sets between instances and frames #236

@kvark

Description

@kvark

It's essential for a Vulkan-like renderer to come up with a good story on how resources are bound to shaders. The general best practice here is to divide all the resources into groups based on how often they need to be updated (e.g. per-draw, per-pass, global). Then we'd have a descriptor set per such a resource group.

That would be the first step. Then we'd need to make sure we aren't creating new descriptor sets (and writing them) for contents that are already used by other draw calls, i.e. we share the sets. This implies tracking which sets are created, and making sure we clear them up when the corresponding resources are destroyed (I don't think we need to track any more epochs with this).

When this is done, we can start thinking about upstreaming the concept of descriptor sets to WR proper, so that the renderer is responsible for managing them. This would only make sense if the renderer has a better opportunity to see the descriptor lifetime than the device.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions