-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add some tests for GPUCanvasContext getConfiguration #3973
Conversation
9d9a458
to
b18e2e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@kainino0x I've fixed all ts errors. We should be good now. |
@@ -459,8 +462,9 @@ g.test('viewFormats') | |||
}, !compatible); | |||
|
|||
const configuration = ctx.getConfiguration(); | |||
t.expect(configuration.viewFormats?.length === 1); | |||
t.expect(configuration.viewFormats[0] === viewFormat); | |||
const viewFormats = Array.from(configuration!.viewFormats!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking aside: Hm, we should actually change this in the types. The GPUCanvasConfiguration
object that comes from getConfiguration()
is guaranteed to have an array here (not any other kind of iterable). I'll make a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once gpuweb/types#157 gets merged, I'll go fix the CTS. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kainino0x Here's #3977
This PR adds tests for the GPUCanvasContext
getConfiguration()
method that can be tested in Chromium patched with https://chromium-review.googlesource.com/c/chromium/src/+/5890176. It currently requires to run chromium with the experimental WebGPUExperimentalFeatures blink runtime feature (--enable-blink-features=WebGPUExperimentalFeatures
). This is implied if you enable the "Unsafe WebGPU support" flag atchrome://flag#enable-unsafe-webgpu
.Spec PR: gpuweb/gpuweb#4899
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.