Open
Description
I believe that according to the WebGPU spec, canvas display should interact with device loss (and destroy()) as follows:
-
After the device is lost but before calling getCurrentTexture, it should keep returning the last displayed frame
-
After the device is lost and after calling getCurrentTexture, it should return:
- a solid black image, if configure()d as opaque
- a blank transparent image, if configure()d as transparent
-
Update tests for Canvas contents after device destroy or device loss gpuweb#4859; see https://web-platform-tests.org/writing-tests/reftests.html#multiple-references
See also op: canvas read as an image source on device destroyed #3956
Rough test cases:
- Render something, destroy the device, then wait a few frames before the screenshot is taken
- Render something, destroy the device, wait a few frames, call getCurrentTexture
- some more cases regarding configuration; see Add more cases to canvas reftest with device loss #3715
- (obsolete?) some where the rendering work takes longer on the queue timeline, so that the destroy is more likely to be processed before it completes; see What happens on the device timeline after
GPUDevice.destroy
is called? gpuweb#4294 (comment)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Open (no TODO)