Skip to content
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

allow handling errors for spirv and glsl shader #313

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

rajveermalviya
Copy link
Collaborator

Context

Currently only the shader parse errors in wgsl are catch-able via error-scopes / uncaptured-error-callback. If parse errors for spirv & glsl occur the library panics here & here.

This PR fixes it by making sure such errors goes through typical error scopes. Though keep in mind that, if the reported error is ignored and the invalid shader module object is passed to further functions (wgpuDeviceCreateComputePipeline, wgpuDeviceCreateRenderPipeline), those functions will panic immediately instead of "error-ing".

Testing

tested with an invalid glsl shader

@rajveermalviya rajveermalviya merged commit d5a0084 into gfx-rs:trunk Nov 3, 2023
16 checks passed
@rajveermalviya rajveermalviya deleted the shader-error branch November 3, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants