-
Notifications
You must be signed in to change notification settings - Fork 905
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
WGL and EGL's context activation is unsound #6211
Comments
There is no direct repro other than that the safety constraints at: Lines 1105 to 1112 in e7c139b
are invalid/impossible to uphold after the call to Lines 588 to 595 in e7c139b
I've started getting into a solution at #5505 (comment) per a request from @jimblandy, and the simple verdict is that WGPU should probably move towards GL context sharing to solve all this trouble. That way WGPU can still share resources, while owning its own unique context that it can (un)current at any point in time without affecting external contexts. Unfortunately context sharing can be finicky based on the platform (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1486) and might require a larger refactor of Separate from that there appear to be some hacks to replace the context on the fly as soon as a surface is available. This is entirely unavoidable if we could create a |
Description
@MarijnS95 and I have determined that, in at least one case, the current WGL and EGL GLES backends are unsound, because conditions for safely conflict with the Soundness Property.
Repro steps
Will defer to @MarijnS95.
Expected vs observed behavior
These APIs should be sound, meaning that it is impossible for safe Rust to provoke UB or other memory unsafety.
The text was updated successfully, but these errors were encountered: