-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shaders] More graceful error handling (#584)
The transition of the vello crate to use the vello_shaders crate regressed developer ergonomics around compilation failures, in which compilation failures always caused a panic and the displayed debug-formatted error message wasn't pretty printed. The panic was particularly bad with hot-reload since it effectively undid its usefulness by crashing the whole process on shader misspellings. This change alleviates those regressions by adding better display formatting to WGSL parse errors returned from the shaders crate and propagating errors up to clients instead of always panicking. The Debug formatting is still a little wonky so call-sites are currently responsible for formatting errors with Display to get a more readable compiler message. This PR only updates `with_winit` with pretty-printing.
- Loading branch information
Showing
5 changed files
with
114 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
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
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