Open Bug 1975308 Opened 1 year ago Updated 4 days ago

PlayCanvas demos break when using video elements as `copyExternalImageToTexture`

Categories

(Core :: Graphics: WebGPU, defect, P3)

defect

Tracking

()

People

(Reporter: ErichDonGubler, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Steps to reproduce

  1. Open a demo that uses a video for a part of its rendering in WebGPU, such as https://playcanvas.vercel.app/#/graphics/reflection-box. Observe that the rendering halts on the first frame, with some parts obviously rendered incorrectly when compared to Chrome.

  2. Open the developer console. Observe the following console log error entry:

    Uncaught TypeError: GPUQueue.copyExternalImageToTexture: 'source' member of GPUCopyExternalImageSourceInfo could not be converted to any of: ImageBitmap, HTMLImageElement, HTMLCanvasElement, OffscreenCanvas.
    

An exhaustive list of demos in which this breaks things:

I've run into this same problem in spark.js my workaround is to create an ImageBitmap for each VideoFrame, but presumably this adds some overhead and is only required for Firefox. Other browsers support VideoFrame as a source argument, and so does Firefox in the gl.texImage2D code path.

Ignacio: You can follow along with progress for VideoFrame specifically with bug 1922100. Would you please file a bug noting that spark.js is blocked on that? 🙏🏻🥺

Doing a bit of debugging, this particular bug is blocked on HTMLVideoElement, which is bug 1922098.

Depends on: 1922098
No longer depends on: 1921454
See Also: → 1922100

Will do, thanks!

See Also: → 2040058

Hi, this bug blocks enabling WebGPU-based rendering for Figma when running in Firefox. We're interested in getting WebGPU support rolled out to more browsers so would appreciate a fix!

P3: popular app/demo

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.