-
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 more cases to canvas reftest with device loss #3715
base: main
Are you sure you want to change the base?
Conversation
cc @perryuwang |
So my understanding is as follows, is it accurate?
|
I think so. It should be the same regardless of whether getCurrentTexture is called: both configure() and getCurrentTexture() wipe the canvas to blank (transparent or opaque depending on the configuration). |
src/webgpu/web_platform/reftests/canvas_display_after_device_lost.html.ts
Show resolved
Hide resolved
gpuweb/gpuweb#4606 was resolved, and this test should still be correct. |
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.
A couple of nits but LGTM.
let threw; | ||
try { | ||
const colorAttachment = ctx.getCurrentTexture(); | ||
threw = false; |
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.
Why not initialize threw
to false
instead of setting it here?
draw('cvs30', '#000000'); | ||
draw('cvs31', '#000000'); | ||
draw('cvs32', '#00000000'); | ||
draw('cvs33', '#00000000'); |
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.
µNit: It's a little strange to have some of these colors be 6 hex digits and others be 8? I feel like the intent might be a bit clearer if we explicitly put the last FF/00
on them to indicate the expected alpha state?
Test for gpuweb/gpuweb#4606
Expected results need careful review.
See discussion here about what the spec says: #3669 (review)
Issue: #3251
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.