Decouple surfaces from GL contexts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 193
- Forks
- 100
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 9
Description
Moved from https://github.com/pcwalton/surfman/issues/65#issuecomment-638326907
This is a blocker for proper GL support in gfx-rs/wgpu.
@asajeffrey
tl;dr: we might be able to lift the restriction that surfman
Surfaceshave an associated producerContextthat has draw access. This restriction was needed for GLX, but that's not a supported platform any more.
@pcwalton
it might be the case that we can drop the requirement that surfaces are tied to context now
because we're using DXGI to allocate WGL surfaces and we dropped GLX in favor of EGL
I would love to be able to drop that requirement, it's an artificial limitation that doesn't match how GPU hardware actually works obviously
it was purely the product of baroque APIs
this should be supported by the more modern versions of all the APIs were care about
IOSurfaceis internally completely decoupled from GL contexts, as are DXGI surfaces which are DirectX resources in the first place (not OpenGL)
in modern EGL, a combination of EGLImageKHR and this extension gives you decoupling as well https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_surfaceless_context.txt
the current design is me being a bit overly conservative -- I considered GLX support a requirement at first, and then eventually got fed up with it and found, happily, that I could just drop it
but didn't revisit the design
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start with the current Surface/Context API and the linked historical discussion; map the platform assumptions around GLX, EGL, WGL, DXGI, and IOSurface, then verify that surfaces can be used without an associated producer context across supported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100