Skip to content

Threaded emscripten support#571

Open
JoeOsborn wants to merge 59 commits into
libretro:emscripten_testingfrom
JoeOsborn:emscripten_testing
Open

Threaded emscripten support#571
JoeOsborn wants to merge 59 commits into
libretro:emscripten_testingfrom
JoeOsborn:emscripten_testing

Conversation

@JoeOsborn

Copy link
Copy Markdown

This patch (on top of emscripten_testing, not develop) allows for pthread compilation of mupen64. Unfortunately as long as libco is still in use it must be built with ASYNC=1 as well as pthread=(POOL_SIZE).

m4xw and others added 30 commits February 6, 2024 12:58
…n-mupen64plus-nx.git libretro-common/

subrepo:
  subdir:   "libretro-common"
  merged:   "f9f6ac61c"
upstream:
  origin:   "git@github.com:libretro-fork/libretro-common-mupen64plus-nx.git"
  branch:   "master"
  commit:   "f9f6ac61c"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"
…lags

iOS/tvOS: change a few build flags to try to get a bit more performance
…plus-core/

subrepo:
  subdir:   "mupen64plus-core"
  merged:   "efb46b8a1"
upstream:
  origin:   "../mupen64plus-core"
  branch:   "rebase"
  commit:   "efb46b8a1"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"
subrepo:
  subdir:   "mupen64plus-core"
  merged:   "a362165c0"
upstream:
  origin:   "https://github.com/libretro/mupen64plus-core.git"
  branch:   "master"
  commit:   "a362165c0"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"
subrepo:
  subdir:   "GLideN64"
  merged:   "ff0793c9c"
upstream:
  origin:   "../GLideN64"
  branch:   "develop"
  commit:   "ff0793c9c"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"
Note: Removal of NoiseTex
subrepo:
  subdir:   "GLideN64"
  merged:   "50604252b"
upstream:
  origin:   "git@github.com:libretro/GLideN64.git"
  branch:   "develop"
  commit:   "50604252b"
git-subrepo:
  version:  "0.4.6"
  origin:   "???"
  commit:   "???"
subrepo:
  subdir:   "GLideN64"
  merged:   "b33fa191b"
upstream:
  origin:   "../GLideN64"
  branch:   "develop"
  commit:   "b33fa191b"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "110b9eb"
m4xw and others added 6 commits February 26, 2025 16:01
subrepo:
  subdir:   "mupen64plus-rsp-paraLLEl"
  merged:   "fd28f47a9"
upstream:
  origin:   "git@github.com:libretro/parallel-rsp.git"
  branch:   "master"
  commit:   "fd28f47a9"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "110b9eb"
@m4xw

m4xw commented Apr 14, 2025

Copy link
Copy Markdown
Collaborator

I need to resync my emscripten branch its a bit out of date again..

Coolcord and others added 6 commits June 4, 2025 14:03
* add memory map setup

* move retroarch memory map setup to device.c

* update retroarch memory map setup to map address space properly

* add memory map flags for the retroarch memory maps

* refactor to map the entirety of KSEG0 and KSEG1

* finish mapping the whole KSEG1 address space and improve code readability

* remove the -1 for the romsize mapping

* set dd_rom_size when setting the pointer for it

* fix pointers to dd regs and rom

* adjust retroarch memory mapping to use the existing struct from init_device

* revise use of the other mappings struct and fix broken pointers
Comment thread Makefile Outdated

ifneq ($(pthread),0)
CPUFLAGS += -pthread
LDFLAGS += -lpthread

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Drive by review:

The -pthread flag is both a linker flag and a cflag, you shouldn't use -lpthread directly and instead rely on the compiler to set it with -pthread.

warmenhoven and others added 5 commits January 12, 2026 14:45
GLideN64's BufferedDrawer uses persistent buffer mappings
(GL_MAP_PERSISTENT_BIT) which become invalid when the GL context is
destroyed during fullscreen toggle. RetroArch doesn't call
context_destroy() before recreating the context, so detect the
context recreation by checking if emulation is already running when
context_reset() is called.
and classify FD5xx as Adreno and FD6xx as Adreno_no_bugs for proper
workaround selection.
…top OpenGL

as it causes rendering issues with N64 depth compare.
@JoeOsborn JoeOsborn force-pushed the emscripten_testing branch from a08d8a0 to 98b29fd Compare March 5, 2026 20:29
@JoeOsborn

Copy link
Copy Markdown
Author

This is rebased on upstream/develop and adds a fix for savestates under emscripten-with-pthreads.

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.