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

Loosen Viewport validation tests to match spec update #4106

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

toji
Copy link
Member

@toji toji commented Dec 18, 2024

Should not be landed until gpuweb/gpuweb#5025 has been merged into the spec.

Updates the viewport validation tests to match the new behavior that allows viewports to extend beyond the render attachment bounds.


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.

@toji toji requested a review from kainino0x December 18, 2024 19:04
@toji toji requested a review from greggman December 18, 2024 23:12
@kainino0x kainino0x marked this pull request as draft December 19, 2024 00:51
@kainino0x
Copy link
Collaborator

I'll mark it as draft to prevent it from being merged accidentally.

{ om: -2, od: -1, sd: 0 },
{ om: 1, od: 0, sd: 0 },
{ om: 1, od: 1, sd: -1 },
{ om: 1, od: -0.1, sd: 0 },
Copy link
Collaborator

Choose a reason for hiding this comment

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

For each of these we should ideally test two cases that are just an epsilon apart, one valid and one invalid. (see nextAfterF32 in math.ts)

and in order to make it clear that those test cases are actually doing what we expect, it would help to put _success as a parameter, instead of computing it in the test

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