bevyengine / bevyengine/bevy

indicate cause of failure for `RenderPipelineCache::get()`

Open
#3,934 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Currently, a user can define a shader handle, use it in a `RenderPipelineDescriptor`, and pass that descriptor to `RenderPipelineCache::queue()` without ever associating the handle with an actual `Shader`. The pipeline descriptor remains queued indefinitely with no warnings emitted to the user.

## What solution would you like?

Change the return type of `RenderPipelineCache::get()` to a `Result` whose `Err` variant indicates the reason that the descriptor is still queued.

## What alternative(s) have you considered?

- Track the number of calls to `RenderPipelineCache::process_queue()` since the descriptor was queued and emit a warning after some threshold.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.