WebGLRenderingContext.texImage2D and .texSubImage2D do not accept OffscreenCanvas as a source
Categories
(Core :: Graphics: CanvasWebGL, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
Details
Attachments
(1 file)
We have set of texImage2D and texSubImage2D variants here, and OffscreenCanvas is missing from the list:
In the WebGL conformance suite, we may use OffscreenCanvas as the canvas type if it is available:
And we attempt to use it with texImage2D and texSubImage2D:
https://searchfox.org/mozilla-central/rev/02bd3e02b72d431f2c600a7328697a521f87d9b6/dom/canvas/test/webgl-conf/checkout/js/tests/tex-image-and-sub-image-2d-with-canvas.js#265
https://searchfox.org/mozilla-central/rev/02bd3e02b72d431f2c600a7328697a521f87d9b6/dom/canvas/test/webgl-conf/checkout/js/tests/tex-image-and-sub-image-2d-with-canvas.js#263
This is likely causing some/all of the WebGL conformance suite test failures, including dom/canvas/test/webgl-conf/checkout/conformance/extensions/oes-texture-float-with-canvas.html.
Assignee | ||
Comment 1•2 years ago
|
||
Note this also applies to WebGL2RenderingContext's variants as well.
Assignee | ||
Comment 2•2 years ago
|
||
We can confirm Chrome is shipping this as the TexImageSource accepts an OffscreenCanvas object:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/interfaces/webgl1.idl;l=89
Assignee | ||
Comment 3•2 years ago
|
||
This patch adds OffscreenCanvas as a texture source for texImage2D,
texSubImage2D and texSubImage2D. This applies to both
WebGLRenderingContext and WebGL2RenderingContext. This was causing
several test failures in the WebGL conformance suite with
OffscreenCanvas.
Depends on D136836
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/820859114930 Ensure WebGLRenderingContext texImage/etc support OffscreenCanvas as a source. r=jgilbert,webidl,smaug
Comment 5•2 years ago
|
||
bugherder |
Description
•