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

Depth clip/clamp test #753

Merged
merged 1 commit into from
Sep 27, 2021
Merged

Depth clip/clamp test #753

merged 1 commit into from
Sep 27, 2021

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Sep 22, 2021

See gpuweb/gpuweb#2100

In Chromium (except format we don't support):


Author checklist for test code/plans:

  • All outstanding work is tracked with "TODO" in a test/file description or .unimplemented() on a test.
  • New helpers, if any, are documented using /** doc comments */ and can be found via helper_index.txt.
  • (Optional, sometimes not possible.) Tests pass (or partially pass without unexpected issues) in an implementation. (Add any extra details above.)

Reviewer sign-off for test code/plans: (Note: feel free to pull in other reviewers at any time for any reason.)

  • The test path is reasonable, the description "describes the test, succinctly, but in enough detail that a reader can read only the test plans in a file or directory and evaluate the completeness of the test coverage."
  • Tests appear to cover this area completely, except for outstanding TODOs. Validation tests use control cases.
    (This is critical for coverage. Assume anything without a TODO will be forgotten about forever.)
  • Existing (or new) test helpers are used where they would reduce complexity.
  • TypeScript code is readable and understandable (is unobtrusive, has reasonable type-safety/verbosity/dynamicity).

@github-actions
Copy link

Previews, as seen when this build job started (1d6a59c):
Run tests | View tsdoc

@kainino0x kainino0x requested review from Jiawei-Shao and removed request for Kangz September 23, 2021 22:10
@kainino0x kainino0x marked this pull request as ready for review September 23, 2021 22:12
@github-actions
Copy link

Previews, as seen when this build job started (bf076c7):
Run tests | View tsdoc

@kainino0x
Copy link
Collaborator Author

PTAL! @kvark @Jiawei-Shao since you've been following gpuweb/gpuweb#2100, perhaps you could both review these (rather nitpicky) tests? Please see if there's aspect I've missed testing.

@Jiawei-Shao, perhaps additionally you could verify these tests against an implementation of the depth-clamping feature on D3D12, since I think you were working on that?

These tests are passing in Chromium (except for depth16unorm which we don't implement yet) on Metal (with both depthClamp values) and D3D12 (with depthClamp:false). They pass on Vulkan with clampDepth:true but fail with clampDepth:false, because for consistency with D3D12/Metal, Tint will need to inject a clamp to the viewport bounds at the end of fragment stages that write frag_depth.
I haven't tried them against Firefox because I don't know what the implementation status is.

These tests will need updating later because I think we need to change the spec from having a depthClamp toggle to having a depthClip toggle.

@kainino0x
Copy link
Collaborator Author

Also I tried to write good comments, but please let me know if any of it can be clarified further.

@kainino0x
Copy link
Collaborator Author

Thanks!

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