-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I'm not sure what to do about this but dealing with dependent limits is kind of a PITA. Tests that deal with storage buffers and storage textures need to take into account that they might have 0. But, they also need to be tested with the maxiumum number of storage buffers/textures. So, if you set the test to use max storage buffers/textures then, unless you have a device that supports 0 you have no easy way to test that the test functions when the limit is 0. While refactoring the tests I start without requesting the limit so on compat I get zero. Once that works I add `MaxLimitsTestMixin` or similar to request the maximum limits, otherwise a compat device would get no coverage. But, now I have the issue that if I'm modifying the test I need to remember to test with 0 so I have to go manually comment out the code that's requesting max limits. So, I thought I'd add this option. Unfortunately, the default limits are defined in src/webgpu/capability_info.ts which is listed as off limits to navigator_gpu.ts. I tried moving the limits table to src/common/limits.ts but then src/webgpu/capabilities_info.ts complained that src/common/limits.ts is off limits. So, I'm not sure where I can put a shared limits.ts file that both navigator_gpu.ts and capabilities_info.ts can access. In the webgpu-dev-extension, I implemented this by requesting 2 adapters and a temp device. ```js // pseudo code tempAdapter = await requestAdapter(options); tempDevice = await requestDevice(...) const defaultLimits = tempDevice.limits; tempDevice.destroy(); adapter = await requestAdapter(options) adapter.limits = defaultLimits; ``` But I wasn't sure that was a good solution in the CTS vs using the limits table. Also, in the webgpu-dev-extension I don't really care about actually enforcing the limits but in the cts, the limits tests in src/webgpu/api/validation/capability_checks/limits will fail if the limits are not enforced and I needed this flag to be able to debug them and make sure they work when a limit is 0.
- Loading branch information
Showing
8 changed files
with
188 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.