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

default entry points to shader modules #3190

Merged
merged 4 commits into from
Nov 28, 2023
Merged

default entry points to shader modules #3190

merged 4 commits into from
Nov 28, 2023

Conversation

beaufortfrancois
Copy link
Collaborator

This PR adds tests for gpuweb/gpuweb#4387


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.)
    They're passing locally with my Chromium build patched with https://chromium-review.googlesource.com/c/chromium/src/+/5057294.

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.

@beaufortfrancois beaufortfrancois force-pushed the entrypoint branch 3 times, most recently from 91b8283 to d929a05 Compare November 24, 2023 14:54
Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM but a bit more test coverage is needed

.combine('shaderModuleStage', ['compute', 'vertex', 'fragment'] as TShaderStage[])
.beginSubcases()
.combine('provideEntryPoint', [true, false])
.combine('extraEntryPoint', [true, false])
Copy link
Collaborator

Choose a reason for hiding this comment

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

We also need to test different stages for the extraEntryPoint. For example a shader module with one vertex and one fragment stage should still be usable with default entry points.

This might be best as a separate test though, to avoid overparameterizing these tests for little extra coverage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

src/webgpu/capability_info.ts Outdated Show resolved Hide resolved
@beaufortfrancois
Copy link
Collaborator Author

FYI Chromium CL has landed in Chrome Canary. See https://chromiumdash.appspot.com/commit/61e85e41a5335013b0b33334efd5646baa9d9b0d

@kainino0x kainino0x merged commit 4f3cbf4 into main Nov 28, 2023
1 check passed
@kainino0x kainino0x deleted the entrypoint branch November 28, 2023 21:05
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.

2 participants