-
Notifications
You must be signed in to change notification settings - Fork 928
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
Surface Configuration Failure is Fatal #3586
Comments
I am running into this, and no clue what exactly is up. Maybe this is a fatal issue though. Crash log ruffle
Edit: ah, this is related to #2519, #3747 and NVIDIA/egl-wayland#72 |
As mentioned here #5382 (comment) I believe we should just go with non-fatal errors and deal with the fallout as it happens. #5382 describes a way to trigger such a failure, but since it requires certain hardware setup I'd suggest to anyone tackling this to do a throw-away test that artificially makes surface creation fail internally and then see try to handle it with a different surface, ensuring that this works. If we can prove this for any single case to work it's an improvement over status quo. Also, as pointed out by this ticket this affects |
@Wumpf Curious what you think is the best next step here. As I see it there are two changes we can make, both of which are breaking changes:
Curious if you have any preferences / thoughts, I'm a happy to make a PR but I'd like consensus on what you all think is the right approach as people who know this code much better than I do :) To a certain extent, I think |
Result would be nice, but as most other things we have to stick with the asynchronous error handling model that the WebGPU spec enforces (that's this signature https://www.w3.org/TR/webgpu/#dom-gpucanvascontext-getcurrenttexture in this case). If we wouldn't do this, then we'd end up with two different kinds of error handling when targeting WebGPU and everything else, and bridging this over is one of the goals of the project. Which then leaves us with |
@Wumpf I've started poking at this a little more. That's a fair point about ensuring we match the Given that, do you have a recommendation on what we return in the case there was an error? The 4 things that are returned by
The first has a trivial default value when there's an error. Any suggestions on what to return for For webgpu the definition of For other backends, the definition lives here: wgpu/wgpu/src/backend/wgpu_core.rs Line 3062 in ec21000
Thoughts on just returning the wgpu/wgpu/src/backend/wgpu_core.rs Lines 759 to 760 in 81963e2
Assuming you're on board with that, I can send you a PR later today that makes this change. |
Description
https://github.com//gfx-rs/wgpu/blob/13d2c3673c5e32c32baa4b610c01885afdb7601a/wgpu/src/backend/direct.rs#L734 means that all surface configure failures are fatal. We need to work out the steps to pass the error up through the error system.
There may be some more widespread consequences of having incomplete surfaces that need to be checked out.
The text was updated successfully, but these errors were encountered: