-
Notifications
You must be signed in to change notification settings - Fork 957
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 remaining tests for WebAssembly #3282
Comments
For issue one, we should be calling getError on the gl context after the test runs to make sure there were no errors (and if there were, hit the validation canary) so this turns into a true failure |
That's also kind of what I had in mind. Would you add a wasm specific part to the test code that directly queries the webgl getError fn? Or do other backends (except opengl) have a similar API so that it might be interesting to add to wgpu itself? |
I think it would end up as wasm specific code which accesses the webgl2 context directly. All other apis have callback systems (including native gl https://github.com/gfx-rs/wgpu/blob/master/wgpu-hal/src/gles/egl.rs#L232) which we already hook. |
Closing as old, see #3678 for more info about current state |
After adding support for running the current tests via WebAssembly in the browser (#3238), there were 2 tests that were not easily fixable for the WebAssembly target.
clear_texture.rs
pass, but there aretexSubImage2D: invalid format
warnings in the browser dev-console. Which probably means that there are some false-positives.buffer_copy.rs
is executing code that is expected to panic. As catching an unwinding panic is not working for WASM, a workaround needs to be used. For this test, the workaround doesn't work because apparently the panic is not getting redirected to the error scope of the device.In order to make tests to be executed by the WASM browser test, the
#[wasm_bindgen_test]
attribute needs to be added (next to the usual#[test]
)The text was updated successfully, but these errors were encountered: