Skip to content

Conversation

@Jiawei-Shao
Copy link
Collaborator

This patch adds tests on the use of new storage texture accesses read-only and read-write in the creation of bind group
layouts.

This patch also upgrades the version of @webgpu/types to the latest one to support these two storage texture accesses.

Note that right now this test can only pass when Chromium is launched with --enable-dawn-features=allow_unsafe_apis.

Issue: #3078


Requirements for PR author:

  • [*] All missing test coverage is tracked with "TODO" or .unimplemented().
  • [*] New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • [*] Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

@Jiawei-Shao Jiawei-Shao requested a review from Kangz November 22, 2023 08:24
Copy link
Collaborator

@Kangz Kangz left a comment

Choose a reason for hiding this comment

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

@ben-clayton I'm surprised that Jiawei had to regenerate the cache here, is that expected?

@ben-clayton
Copy link
Contributor

@ben-clayton I'm surprised that Jiawei had to regenerate the cache here, is that expected?

So the hashes will change if there's files modified that could impact the generation of the cache files. The fact the files have actually changed is likely due to differences in NodeJS versions. This is discussed here:

Since source changes will sometimes change the hash without changing the generated cache, sometimes the cache will be regenerated unnecessarily. This is OK, but try to avoid committing no-op regenerations - this will happen if your version of Node produces different gzip outputs than the original committer's Node did for the same input.

It would be good to try keeping the CTS developers on the same version of the NodeJS, and avoiding no-op regeneration like this.

@ben-clayton
Copy link
Contributor

Created #3187 to try to prevent continual cache regeneration.

Copy link
Contributor

@jiangzhaoming jiangzhaoming left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks

.desc(
`
Test that a validation error is generated if the format doesn't support the storage usage.
Test that a validation error is generated if the format doesn't support the storage usage. A
Copy link
Contributor

Choose a reason for hiding this comment

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

So the "storage usage" mentioned here and in kTextureFormatInfo actually means supporting "write-only" or "read-only" STORAGE_BINDING in the spec, and the new added readWriteStorage means "read-write" STORAGE_BINDING.

Luckily formats that support readWriteStorage is a subset of formats that support storage (very reasonable), but I am not sure if we need to rename storage or make a comment somewhere?

Jiawei-Shao and others added 3 commits November 24, 2023 15:17
Co-authored-by: jzm-intel <zhaoming.jiang@intel.com>
Co-authored-by: jzm-intel <zhaoming.jiang@intel.com>
Copy link
Collaborator

@Kangz Kangz left a comment

Choose a reason for hiding this comment

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

LGTM, I just don't understand while all these new files where created.

@Jiawei-Shao Jiawei-Shao merged commit 6e75f19 into gpuweb:main Nov 25, 2023
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.

4 participants