-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Change log level in library_glemu.js #23083
base: main
Are you sure you want to change the base?
Conversation
Change the log level from error to warning during GL emulation
#if GL_UNSAFE_OPTS == 1 | ||
err('WARNING: using emscripten GL emulation unsafe opts. If weirdness happens, try -sGL_UNSAFE_OPTS=0'); | ||
console.warning('WARNING: using emscripten GL emulation unsafe opts. If weirdness happens, try -sGL_UNSAFE_OPTS=0'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see these more than once in you program? We could use the warnOnce helper here maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are at least 10 such warnings. I'll use the warnOnce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this message shows up for each JS wroker, so I don't think that warnOnce will help here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. why is GL being initialized on each worker? Is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the predefined thread pool (-sPTHREAD_POOL_SIZE='navigator.hardwareConcurrency
) in order to synchronously spawn threads within our code. I suspect that worker initialization automatically triggers GL init method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed that seems to be the case. I wonder if we can/should avoid initializing GL on threads that are not using GL (i.e. can we call init() lazily?)
Change the log level from error to warning during GL emulation.
It's a bit annoying since the console log receives a lot of error level messages, which are actually warnings.