-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - report shader processing errors in RenderPipelineCache
#3289
Closed
jakobhellermann
wants to merge
4
commits into
bevyengine:main
from
jakobhellermann:resilient-shader-hot-reloading
Closed
[Merged by Bors] - report shader processing errors in RenderPipelineCache
#3289
jakobhellermann
wants to merge
4
commits into
bevyengine:main
from
jakobhellermann:resilient-shader-hot-reloading
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jakobhellermann
added
A-Rendering
Drawing game state to the screen
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
S-Needs-Review
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Dec 10, 2021
jakobhellermann
force-pushed
the
resilient-shader-hot-reloading
branch
from
December 21, 2021 20:24
8adc6bb
to
c5254f6
Compare
jakobhellermann
commented
Dec 21, 2021
cart
reviewed
Dec 22, 2021
jakobhellermann
force-pushed
the
resilient-shader-hot-reloading
branch
from
December 22, 2021 21:13
c5254f6
to
305ca70
Compare
Great work! Huge win for shader development workflows. I can confirm that this works as expected for both top level shaders and imports. |
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Dec 22, 2021
### Problem - shader processing errors are not displayed - during hot reloading when encountering a shader with errors, the whole app crashes ### Solution - log `error!`s for shader processing errors - when `cfg(debug_assertions)` is enabled (i.e. you're running in `debug` mode), parse shaders before passing them to wgpu. This lets us handle errors early.
bors
bot
changed the title
report shader processing errors in
[Merged by Bors] - report shader processing errors in Dec 22, 2021
RenderPipelineCache
RenderPipelineCache
bors bot
pushed a commit
that referenced
this pull request
Dec 29, 2021
in #3289 I accidentally only logged errors for wgsl shaders, this PR expands the error reporting the the other supported shader types.
mockersf
pushed a commit
to mockersf/bevy
that referenced
this pull request
Jan 1, 2022
…ne#3441) in bevyengine#3289 I accidentally only logged errors for wgsl shaders, this PR expands the error reporting the the other supported shader types.
bors bot
pushed a commit
that referenced
this pull request
Mar 29, 2022
related: #3289 In addition to validating shaders early when debug assertions are enabled, use the new [error scopes](https://gpuweb.github.io/gpuweb/#error-scopes) API when creating a shader module. I chose to keep the early validation (and thereby parsing twice) when debug assertions are enabled in, because it lets as handle errors ourselves and display them with pretty colors, while the error scopes API just gives us a string we can display. This change pulls in `futures-util` as a new dependency for `future.now_or_never()`. I can inline that part of futures-lite into `bevy_render` to keep the compilation time lower if that's preferred.
aevyrie
pushed a commit
to aevyrie/bevy
that referenced
this pull request
Jun 7, 2022
…e#3675) related: bevyengine#3289 In addition to validating shaders early when debug assertions are enabled, use the new [error scopes](https://gpuweb.github.io/gpuweb/#error-scopes) API when creating a shader module. I chose to keep the early validation (and thereby parsing twice) when debug assertions are enabled in, because it lets as handle errors ourselves and display them with pretty colors, while the error scopes API just gives us a string we can display. This change pulls in `futures-util` as a new dependency for `future.now_or_never()`. I can inline that part of futures-lite into `bevy_render` to keep the compilation time lower if that's preferred.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
…e#3675) related: bevyengine#3289 In addition to validating shaders early when debug assertions are enabled, use the new [error scopes](https://gpuweb.github.io/gpuweb/#error-scopes) API when creating a shader module. I chose to keep the early validation (and thereby parsing twice) when debug assertions are enabled in, because it lets as handle errors ourselves and display them with pretty colors, while the error scopes API just gives us a string we can display. This change pulls in `futures-util` as a new dependency for `future.now_or_never()`. I can inline that part of futures-lite into `bevy_render` to keep the compilation time lower if that's preferred.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Rendering
Drawing game state to the screen
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Solution
error!
s for shader processing errorscfg(debug_assertions)
is enabled (i.e. you're running indebug
mode), parse shaders before passing them to wgpu. This lets us handle errors early.