Skip to content
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

Test using a pipeline created with null bind group layout #4113

Merged
merged 7 commits into from
Dec 24, 2024

Conversation

Jiawei-Shao
Copy link
Collaborator

This patch adds validation tests on the use of a render pipeline or a compute pipeline
created with null bind group layouts. Note that as the total amount of the sub cases
(32) is not that large both null and undefined are tested in these tests.

Issue: #4075


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.)
  • [*] Test have be tested with compatibility mode validation enabled and behave as expected. (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.

@jiangzhaoming
Copy link
Contributor

Since all cases are expected to success, is it possible to merge this new tests into the previous one create_pipeline_with_null_bind_group_layouts, such that "if the pipeline can be created successfully, it can be used in the render/compute pass encoder successfully"?

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.

After second thought, we are testing two things if test cases merged (creating pipeline vs setting bind group), so it might be good to keep as separated tests (despite of some duplicated codes)?
@kainino0x What do you think? Sorry for troubling...

src/webgpu/api/validation/createPipelineLayout.spec.ts Outdated Show resolved Hide resolved
@kainino0x
Copy link
Collaborator

I haven't had a chance to actually review this (and I'm going on break - apologies).
But I don't think I have a strong opinion between the two options. Generally, since these are tests, I prefer duplicating some code over testing too many things at once (which can make it hard for reviewers/readers to determine whether the test is covering all of the necessary cases), but it's a balance and depends on what y'all think as reviewer and author.

@Jiawei-Shao
Copy link
Collaborator Author

I haven't had a chance to actually review this (and I'm going on break - apologies). But I don't think I have a strong opinion between the two options. Generally, since these are tests, I prefer duplicating some code over testing too many things at once (which can make it hard for reviewers/readers to determine whether the test is covering all of the necessary cases), but it's a balance and depends on what y'all think as reviewer and author.

Done

@Jiawei-Shao
Copy link
Collaborator Author

The failure is not related to my PR.

PTAL, thanks!

@jiangzhaoming
Copy link
Contributor

I proposed web-platform-tests/wpt#49823 to fix the CI workflow.

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

@Jiawei-Shao
Copy link
Collaborator Author

Thanks a lot for your fix! @jzm-intel

@Jiawei-Shao Jiawei-Shao merged commit d19a6a2 into gpuweb:main Dec 24, 2024
1 check passed
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.

3 participants