Allow evicting shaders from the `PipelineCache`
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
For runtime shader editing, I compile and dispatch shaders many times during the game's lifecycle.
The `PipelineCache` doesn't currently expose any functions to remove an existing pipeline by ID, so there is no way to clean up unused pipelines.
## What solution would you like?
Add functions to:
- remove/replace shaders
- drop pipelines by id
## What alternative(s) have you considered?
Creating and managing pipelines myself - but Bevy already has a lot of convenience that I'd like to use that is simply inaccessible, so I'd be reinventing the wheel.
Contributor guide
Research direction
Start with the PipelineCache implementation and its existing shader and pipeline lifecycle APIs. Trace how pipelines are identified and retained, then define the requested removal or replacement operations and verify that runtime shader editing can release unused pipelines by ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100