Add more cases to canvas reftest with device loss#3715
Add more cases to canvas reftest with device loss#3715kainino0x wants to merge 3 commits intogpuweb:mainfrom
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. |
| let threw; | ||
| try { | ||
| const colorAttachment = ctx.getCurrentTexture(); | ||
| threw = false; |
There was a problem hiding this comment.
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.
µ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?
|
This is no longer valid because the spec allows multiple behaviors. The existing test also isn't valid anymore (not sure if it was removed already or not). It is possible to test multiple behaviors: |
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.