gpuweb / cts

WebGPU Conformance Test Suite
https://gpuweb.github.io/cts/
BSD 3-Clause "New" or "Revised" License
129 stars 80 forks source link

canvas read as an image source alpha mode behavior update #1561

Open shrekshao opened 2 years ago

shrekshao commented 2 years ago

https://github.com/gpuweb/gpuweb/pull/2905

shrekshao commented 2 years ago

https://www.w3.org/TR/webgpu/#GPUCanvasAlphaMode

(GPUCanvasAlphaMode) selects how the contents of the canvas will be interpreted when read, when rendered to the screen or used as an image source (in drawImage, toDataURL, etc.)

We have reftests for "canvas read when rendered to the screen", we still need reftests for "canvas read when used as an image source."

Operations include drawImage, toDataURL, texImage2D, toBlob etc.

shrekshao commented 2 years ago

Now it seems best to expand the readbackFromWebGPUCanvas.spec.ts with

kainino0x commented 2 years ago

Finally tested and filed https://github.com/gpuweb/gpuweb/issues/3295

kainino0x commented 2 years ago

@shrekshao this issue is still marked "started". Do you remember if it was done or was there still some work to do?

shrekshao commented 2 years ago

Seems that the TODOs on kAllCanvasTypes are still missing

kainino0x commented 2 years ago

I'll unmark it as "Started" and unassign you for now, but feel free to reassign yourself if you end up working on it