-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix: Use virtual-webgl to circumvent browser limits on WebGL contexts #2349
base: main
Are you sure you want to change the base?
Conversation
mofojed
commented
Jan 24, 2025
•
edited
Loading
edited
- Browsers often have a restriction on the number of WebGL contexts that can be created
- e.g. Chrome on MacOS has a limit of 8
- Use virtual-webgl to circumvent that limit. Basically it creates one context that is used for the whole page.
- Browsers often have a restriction on the number of WebGL contexts that can be created - e.g. Chrome on MacOS has a limit of 16 - Use virtual-webgl to circumvent that limit. Basically it creates one context that is used for the whole page.
- Add a mock for virtual-webgl
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2349 +/- ##
==========================================
- Coverage 46.76% 46.09% -0.67%
==========================================
Files 710 712 +2
Lines 39107 39674 +567
Branches 9773 10055 +282
==========================================
Hits 18288 18288
- Misses 20808 21330 +522
- Partials 11 56 +45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
- The npm package doesn't export virtual-webgl, just virtual-webgl2 - It hasn't been updated in years anyway
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.
Should we add an e2e test for this?
e2e test kind of annoying because don't have deephaven.ui in the e2e tests here so can't define the dashboard programmatically, and adding 16 plots and moving them all to be visible cycling through them will be annoyingly slow/difficult to write robustly... Hmmmmm actually I just realized I could define all the plots programmatically and then create a layout with all those plots, and have that in the data. That wouldn't be too bad... |
- Added e2e tests for testing with 20 plots visible in a dashboard - It seems to open the 20 plots correctly, but the Chromium snapshot is incorrect still...
- But for some reason it's not working in the e2e tests within Docker... ugh.
- Export it as a function and explicitly run it - When building production app, it wasn't working as an IIFE.
- Firefox in the docker container for some reason has an error: ``` [JavaScript Warning: "Failed to create WebGL context: WebGL creation failed: * WebglAllowWindowsNativeGl:false restricts context creation on this system. () * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)" ``` - Just catch the error and carry on.