Skip to content
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_renderViaOffscreenBackBuffer_init_and_creation_test #6986

Conversation

juj
Copy link
Collaborator

@juj juj commented Aug 13, 2018

Move renderViaOffscreenBackBuffer/OFFSCREEN_FRAMEBUFFER enabling test behind GL_DEBUG for 'do not pay for what you do not use', and add missing initialization of renderViaOffscreenBackBuffer field.

@juj juj added the GL label Aug 13, 2018
@juj juj force-pushed the fix_renderViaOffscreenBackBuffer_init_and_creation_test branch from a744c8b to ace6b09 Compare August 13, 2018 16:02
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm with those comments addressed.

Verified this fixes browser.test_html5_webgl_create_context locally (which was broken).

Module.printErr('renderViaOffscreenBackBuffer=true specified in WebGL context creation attributes, pass linker flag -s OFFSCREEN_FRAMEBUFFER=1 to enable support!');
#endif
return 0;
if (webGLContextAttributes['renderViaOffscreenBackBuffer']) Module.printErr('renderViaOffscreenBackBuffer=true specified in WebGL context creation attributes, pass linker flag -s OFFSCREEN_FRAMEBUFFER=1 to enable support!');
Copy link
Member

Choose a reason for hiding this comment

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

Module.printErr( should be err(

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks!

#if GL_DEBUG
Module.printErr('renderViaOffscreenBackBuffer=true specified in WebGL context creation attributes, pass linker flag -s OFFSCREEN_FRAMEBUFFER=1 to enable support!');
#endif
return 0;
Copy link
Member

@kripken kripken Aug 13, 2018

Choose a reason for hiding this comment

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

was the removal of the return 0 intentional? (so now it will warn and continue? sounds ok to me)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, removed that because I don't want to afford to make this check in non-OFFSCREEN_FRAMEBUFFER builds. Then, the return 0; behavior would only be present if GL_DEBUG is set, but that does not feel good - one doesn't want to change runtime behavior depending on a debug flag - so best is to demote the print to a debug time warning only.

@juj juj force-pushed the fix_renderViaOffscreenBackBuffer_init_and_creation_test branch from ace6b09 to 39eb98a Compare August 14, 2018 08:18
… behind GL_DEBUG for 'do not pay for what you do not use', and add missing initialization of renderViaOffscreenBackBuffer field.
@juj juj force-pushed the fix_renderViaOffscreenBackBuffer_init_and_creation_test branch from 39eb98a to fa20d27 Compare August 14, 2018 08:21
@juj juj merged commit f7a5b63 into emscripten-core:incoming Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants