Implement Queue.copyImageBitmapToTexture in WebGPU
Categories
(Core :: Graphics: WebGPU, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: kvark, Assigned: aosmond, NeedInfo)
References
Details
Attachments
(1 file)
See https://gpuweb.github.io/gpuweb/#dom-gpuqueue-copyimagebitmaptotexture
This is required to run the textured-cube WebGPU example.
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Here's what I ended up thinking about CORS:
Only DOM element objects have CORS.
Both DOM element objects and non-DOM objects have "origin-clean
" flags.
In Gecko, we implement origin-clean
via isWriteOnly
, where origin-clean
IFF !isWriteOnly
.
See
https://html.spec.whatwg.org/multipage/canvas.html#the-image-argument-is-not-origin-clean for how CORS becomes origin-clean = false
.
See https://html.spec.whatwg.org/multipage/canvas.html#security-with-canvas-elements for how this propagates.
In particular:
All bitmaps start with their
origin-clean
set to true. The flag is set to false when cross-origin images are used.The value of the
origin-clean
flag is propagated from a source canvas element's bitmap to a newImageBitmap
object bycreateImageBitmap()
. Conversely, a destination canvas element's bitmap will have itsorigin-clean
flags set to false bydrawImage
if the source image is anImageBitmap
object whose bitmap has itsorigin-clean
flag set to false.
I think we might have some of our CORS checks wrong, but I want to think more about it. But this is unblocked and good to land.
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4e76508f9136 Implement WebGPU's Queue.copyExternalImageToTexture. r=jgilbert,jimb,emilio
Comment 5•2 years ago
•
|
||
Backed out for causing mochitest failures on test_queue_copyExternalImageToTexture.html
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/746fbd28a600 Implement WebGPU's Queue.copyExternalImageToTexture. r=jgilbert,jimb,emilio
Comment 7•2 years ago
|
||
bugherder |
Description
•