Skip to content

Conversation

@juj
Copy link
Collaborator

@juj juj commented Sep 30, 2025

SDL2 renderer init attempts to compile a shader with GLES external image content. This causes Firefox to report a shader compilation error, which would cause WebGL proxying to assert().

Demote the assert() into a warning print to let Firefox pass through.

Also because async proxied code cannot get the shader info log, print the info log to the browser console when compile status is queried. This way developers will see all shader compile errors automatically in proxied GL mode.

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Another reason to kill --proxy-to-worker?

@juj
Copy link
Collaborator Author

juj commented Sep 30, 2025

I wouldn't oppose removing --proxy-to-worker. It is a very old implementation by now, and quite WebGL-centric, and monolithic framework/runtime-esque thing.

I think if there are users of the --proxy-to-worker philosophy (i.e. don't assume SharedArrayBuffer, and only async postMessage() proxy what you can), then it would benefit from being re-cast into a build mode where the individual JS library functions themselves would manage the proxying in a DCEable way, using a smaller set of common runtime bits.

@juj
Copy link
Collaborator Author

juj commented Sep 30, 2025

I wonder if @kripken knows of any users of --proxy-to-worker anymore? Iirc. it was originally written to satisfy the cube renderer way way back.

@kripken
Copy link
Member

kripken commented Oct 1, 2025

I'm not sure how many people use --proxy-to-worker atm. I remember it was nice for e.g. making Doom on the Web much more responsive, with just a flag flip.

Github finds various uses, but not sure how many are active:

https://github.com/search?q=%22--proxy-to-worker%22&type=code

@sbc100
Copy link
Collaborator

sbc100 commented Oct 1, 2025

Lets continue that discussion on #25440.

Yes, obviously if there are users out there relying on this then we don't need to go through with the removal. This goes for all the flags / features that we hope to remove. It about removing unused stuff.

@juj juj merged commit ca30742 into emscripten-core:main Oct 1, 2025
33 checks passed
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.

3 participants