[emscripten] Assorted fixes and test enhancements
Tests:
- Parameterize the tests so we don't have to duplicate tests between
core and compat. Most of the tests test exactly the same thing in both
cases but the total runtime is still < 1s so it's fine.
- Make the compat tests mostly work on browsers without compat (except
for one targeted test). Tested on Firefox and Safari.
- Test that all limits are initialized.
- This would have caught the bug fixed in
https://dawn-review.googlesource.com/c/dawn/+/294495
(independently of the externs fix that also would have caught it).
- Test that all limits are non-zero except for maxImmediateSize.
- Make DeviceLevelTests.ValidationError time out, so it will fail
instead of hang on Safari.
Implementation:
- Make compat limits fall back to their core equivalents for browsers
that don't implement them yet.
- Skip passing through the new limits (that we added to Core for Compat)
to browsers that don't implement them yet.
- Fix missing maxBindingsPerBindGroup in emwgpuAdapterRequestDevice.
(Didn't catch this before because Chromium only exposes 1000, but
Firefox and Safari expose 65535 so the test failed.)
- Move maxImmediateSize up next to the other core limits (rather
than buried below the compat limits), and format them so it's easy to
tell where they differ.
- Remove theoretically unnecessary check for maxImmediateSize==undefined
that was added in https://dawn-review.googlesource.com/c/dawn/+/242374
but unfortunately the logs from that original failure no longer exist,
so I can't verify if that issue would still happen or not.
Bug: none
Change-Id: Ieab362a76f70804d4f3581f7dde678ad38ea35ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/294516
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.