Skip to content

Multithreading 13/N: EGL in pthreads#5580

Closed
juj wants to merge 3 commits intoemscripten-core:incomingfrom
juj:egl_rewrite_in_c
Closed

Multithreading 13/N: EGL in pthreads#5580
juj wants to merge 3 commits intoemscripten-core:incomingfrom
juj:egl_rewrite_in_c

Conversation

@juj
Copy link
Collaborator

@juj juj commented Sep 13, 2017

Rewrite EGL API as a C library to make it multithreading capable out of the box without needing to proxy.

This PR shows a different approach to getting APIs multithreaded, in comparison to #5532 and #5533. The advantage here is that it will not be necessary to do any proxying, but all EGL state is immediately shared, since it lives in the wasm heap instead of worker-local JS structures.

@dschuff
Copy link
Member

dschuff commented Sep 14, 2017

So, caveat that I don't really know anything about EGL specifically, but I think this is the way we want to go where possible, because I think it will be the easiest to transition to the eventual wasm-threads (as opposed to workers) future.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like how this builds on top of the HTML5 functionality.

@juj juj force-pushed the egl_rewrite_in_c branch from ca8c965 to b8b4427 Compare November 10, 2017 17:45
@juj juj force-pushed the egl_rewrite_in_c branch from b8b4427 to 4cb3eee Compare January 15, 2018 10:55
@juj
Copy link
Collaborator Author

juj commented Jan 30, 2019

Migrating EGL from JS to C is still important direction. In this PR I did not have a chance to implement all the EGL features that the original library_egl.js had, so was uncomfortable landing it, and since this PR was posted, there have been new contributions to library_egl.js that make the gap a bit bigger. I'll close this PR as old, but the code in this PR could be used as a basis for a C-based EGL implementation if someone is interested. (Recently I migrated my 3D engine to use Emscripten HTML5 WebGL context initialization API instead of EGL, so EGL is no longer on a critical path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants