Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 2, 2023

Split out from #20516

@sbc100 sbc100 force-pushed the egl_wasm64 branch 2 times, most recently from 46c7c2b to a05952b Compare November 2, 2023 18:38
@sbc100 sbc100 changed the title [wasm64] Run all browser64 egl tests (#20598) [wasm64] Run all browser64 egl/gl/glfw tests (#20598) Nov 2, 2023
@sbc100 sbc100 requested review from dschuff and kripken November 2, 2023 18:38
this.keyFunc = null; // GLFWkeyfun
this.charFunc = null; // GLFWcharfun
this.userptr = null;
this.windowPosFunc = 0; // GLFWwindowposfun
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change is because null cannot be converted to BigInt when we return these as pointers.

@sbc100 sbc100 changed the title [wasm64] Run all browser64 egl/gl/glfw tests (#20598) [wasm64] Run all browser64 egl/gl/glfw/glew tests (#20598) Nov 2, 2023
@sbc100 sbc100 enabled auto-merge (squash) November 2, 2023 18:57
@sbc100 sbc100 changed the title [wasm64] Run all browser64 egl/gl/glfw/glew tests (#20598) [wasm64] Run all browser64 egl/gl/glfw/glew tests Nov 2, 2023
extensionIsSupported(name) {
if (!GLEW.extensions) {
GLEW.extensions = UTF8ToString(_glGetString(0x1F03)).split(' ');
GLEW.extensions = GLctx.getSupportedExtensions() || [];
Copy link
Member

Choose a reason for hiding this comment

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

This does not apply the processing that GL_EXTENSIONS_IN_PREFIXED_FORMAT does in library_webgl.js, so it changes behavior potentially?

case 0x1F03 /* GL_EXTENSIONS */:
var exts = GLctx.getSupportedExtensions() || []; // .getSupportedExtensions() can return null if context is lost, so coerce to empty array.
#if GL_EXTENSIONS_IN_PREFIXED_FORMAT
exts = exts.concat(exts.map((e) => "GL_" + e));
#endif
ret = stringToNewUTF8(exts.join(' '));
break;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. Fixed by adding new GL.getExtensions() helper method.

@sbc100 sbc100 merged commit 74fdcac into emscripten-core:main Nov 3, 2023
@sbc100 sbc100 deleted the egl_wasm64 branch November 3, 2023 00:05
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.

2 participants