bevyengine / bevyengine/bevy

Allow evicting shaders from the `PipelineCache`

Open
#19,925 5 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Feature D-Modest S-Needs-Design
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.