-
Notifications
You must be signed in to change notification settings - Fork 938
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
Emscripten wgpu-hal
example is broken
#3245
Comments
FWIW, the GLenum |
The bug seems to be that |
We should update the wiki when this is fixed. |
|
It seems to me that it's Emscripten's job to enable these extensions, if it wants to pretend to be GLES (which does not require extensions to be enabled) while actually running on WebGL (which does). I'm not sure we have any next moves here. |
Is there any significance to Also, is it possible to use https://github.com/emscripten-core/emscripten/blob/main/system/include/emscripten/html5_webgl.h#L61 emscripten_webgl_enable_extension(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context, const char *extension); to manually enable this extension inside wgpu before calling |
If i add the following lines after making context current -> unsafe {
let ctx = emscripten_webgl_get_current_context();
emscripten_webgl_enable_extension(ctx, "WEBGL_debug_renderer_info\0".as_ptr() as _);
} the example works with no issues. |
So, this error arises because emscripten explicitly avoids enabling this extension at https://github.com/emscripten-core/emscripten/blob/main/src/library_webgl.js#L1135 IDK the main reason they do this, but I am guessing because this extension might not be available in firefox.
The bug reports in firefox primarily talk about how UNMASKED_RENDERER provides more info about user's hardware than necessary and easily exploited for fingerprinting. https://bugzilla.mozilla.org/show_bug.cgi?id=1722782#c10 |
Did #3519 fix this issue? |
Yes |
When I build
wgpu-hal/examples/raw-gles.rs
according to the instructions in #2422, I get the following error in the page's console:I'm building and serving the page as follows:
The text was updated successfully, but these errors were encountered: