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

Threaded emscripten improvements #17664

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BinBashBanana
Copy link
Contributor

This cuts down on many of the proxied calls, as well as fixing the platform data that wasn't working when RetroArch was run off a pthread (see #17637). PROXY_TO_PTHREAD itself is removed, instead we create the pthread manually so that its stack size doesn't have to be identical to the browser thread stack size (good for the cores that need larger stacks).

emscriptenwebgl_ctx was made the default video context driver for all emscripten builds.

I've also completely redone the frontend for threaded RetroArch with a dark ozone-like theme, removed the jquery and bootstrap dependency, and added data migration from the old BrowserFS into the new OPFS.

Note that I've removed the userdata and bundle dirs for the threaded build as they are now redundant (everything is on the same mount), and removing them makes it more similar to the regular unix frontend.

I removed support for OPFS without PROXY_TO_PTHREAD; I couldn't get this to work? Supposedly it works with JSPI but that is currently unavailable.

Threaded RetroArch is still built with these makefile options: HAVE_WASMFS=1 PROXY_TO_PTHREAD=1

TODO (later): remove remaining proxied calls in rwebpad, write AudioWorklet audio driver

A few things need to happen before the threaded build replaces the old one:

  • Bump emscripten on the buildbot to 4.0.4
  • Special headers need to be set on web.libretro.com to enable shared memory
  • CORS headers need to be added to buildbot.libretro.com
    • The bundle can be switched to the minimal bundle (pkg/emscripten/libretro-thread/libretro.worker.js) (the current one is quite large and takes 2-3 minutes to unzip into OPFS.)

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.

1 participant