-
Notifications
You must be signed in to change notification settings - Fork 3.5k
workaround_old_chromium_webgl_bug #7459
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
workaround_old_chromium_webgl_bug #7459
Conversation
| self.btest('webgl_draw_triangle.c', '0', args=['-lGL', '-s', 'OFFSCREEN_FRAMEBUFFER=1', '-DEXPLICIT_SWAP=1']) | ||
|
|
||
| # Tests that -s WORKAROUND_OLD_WEBGL_UNIFORM_UPLOAD_IGNORED_OFFSET_BUG=1 rendering works. | ||
| @requires_graphics_hardware |
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.
Does this actually test that code path - does it force the polyfill on somehow?
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.
It just tests that code compiles with that flag enabled. I don't think it is worth spending time to maintaining a test infrastructure where we would enforce the path to kick in.
| } | ||
| } else { | ||
| view = {{{ makeHEAPView('F32', 'value', 'value+count*4') }}}; | ||
| #if WORKAROUND_OLD_WEBGL_UNIFORM_UPLOAD_IGNORED_OFFSET_BUG |
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.
is this needed for every single F32 heap view?
How about creating a helper function to avoid all the code duplication, makeGLHEAPView (adding "GL" in the name, and it adds this check)?
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.
No, it is needed only specifically for these views that it was added to. I would not want to craft any abstractions for this. If I added a makeGLHEAPView() (which lives in core src/parseTools.js) that we'd have to maintain just for this case, then someone would wonder why only parts of src/library_gl.js used makeGLHEAPView() and others used regular makeHEAPView() and it might leak to being used everywhere. I'd prefer to do this as KISS as possible, not building any complexity on top of this.
bd06255 to
b140131
Compare
b140131 to
0e91891
Compare
kripken
left a comment
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.
I see, thanks, lgtm.
|
Its been 5 years since this landed. I wonder if we can remove this workaround now? |
|
Speculative PR: #20925 |
Add -s WORKAROUND_OLD_WEBGL_UNIFORM_UPLOAD_IGNORED_OFFSET_BUG=1 option.