Skip to content

Add invariant test when not an entry point parameter. - #4456

Merged
dj2 merged 2 commits into
gpuweb:mainfrom
dj2:inv
Sep 11, 2025
Merged

dj2 merged 2 commits into
gpuweb:mainfrom
dj2:inv

Conversation

@dj2

@dj2 dj2 commented Sep 9, 2025

Copy link
Copy Markdown
Member

When the @invariant attribute is validated, the requirement to have a @builtin(position) is regardless of if the struct is used as part of an entry point parameter.

Add a CTS test to validate that @invariant is validated this requirement.


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.

When the `@invariant` attribute is validated, the requirement to have a
`@builtin(position)` is regardless of if the struct is used as part of
an entry point parameter.

Add a CTS test to validate that `@invariant` is validated this
requirement.
@dj2
dj2 requested a review from jrprice September 9, 2025 18:59
@dj2
dj2 merged commit 18f1cc7 into gpuweb:main Sep 11, 2025
1 check passed
@dj2
dj2 deleted the inv branch September 11, 2025 00:48
greggman pushed a commit to greggman/cts that referenced this pull request Oct 14, 2025
When the `@invariant` attribute is validated, the requirement to have a
`@builtin(position)` is regardless of if the struct is used as part of
an entry point parameter.

Add a CTS test to validate that `@invariant` is validated this
requirement.
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