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

wgsl: compound statement tests #3337

Merged
merged 1 commit into from
Jan 29, 2024
Merged

wgsl: compound statement tests #3337

merged 1 commit into from
Jan 29, 2024

Conversation

dneto0
Copy link
Contributor

@dneto0 dneto0 commented Jan 26, 2024

wgsl: Add compound statement tests

Validation:
- Check parsing of compound statements
- Update break-if statement to add a case for a plain compound statement
  surrounding a break-if.
- For a declaration in a compound statement, check potential uses
  and potentially conflicting declarations.

Execution:
  Add execution tests for compound statement.

  Observe a value at various points relative to its
  declaration inside a compound statement.

Add timings for new tests

Fixed: #1634


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.

@dneto0 dneto0 added the wgsl label Jan 26, 2024
@dneto0 dneto0 force-pushed the compound-stmt branch 2 times, most recently from 82689c5 to d97ce4b Compare January 26, 2024 20:12
@dneto0
Copy link
Contributor Author

dneto0 commented Jan 26, 2024

Works on NV and Apple

@dneto0 dneto0 requested a review from dj2 January 26, 2024 20:47
Validation:
- Check parsing of compound statements
- Update break-if statement to add a case for a plain compound statement
  surrounding a break-if.
- For a declaration in a compound statement, check potential uses
  and potentially conflicting declarations.

Execution:
  Add execution tests for compound statement.

  Observe a value at various points relative to its
  declaration inside a compound statement.

Add timings for new tests

Fixed: gpuweb#1634
@dneto0 dneto0 enabled auto-merge (squash) January 29, 2024 21:02
@dneto0 dneto0 merged commit ecf7770 into gpuweb:main Jan 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wgsl: compound statement tests
2 participants