Open Bug 1865984 Opened 1 year ago Updated 1 year ago

Add a capability of handling ID3D11Fence in WebGL

Categories

(Core :: Graphics, task)

task

Tracking

()

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

It seems better to use ID3D11Fence with WebGL if it is supported. Since WebGPU needs to use ID3D11Fence.

Assignee: nobody → sotaro.ikeda.g
Blocks: 1863474
Depends on: 1865991
Summary: Add ID3D11Fence handling to WebGL → Add a capability of handling ID3D11Fence in WebGL
Depends on: 1866412

What advantage does using ID3D11Fence provide?

Flags: needinfo?(sotaro.ikeda.g)

If we want to implement GPUQueue:copyExternalImageToTexture(), HTMLCanvasElement and OffscreenCanvas could also be used as source.

In this case, ID3D11Texture2D of SharedSurface_ANGLEShareHandle is going to be imported to WebGPU(wgpu).
If we want to interact with WebGPU with D3D12 backend, SharedSurface_ANGLEShareHandle needs to provide ID3D11Fence for performance.

From it, all canvas that use ID3D11Texture2D will need to implement ID3D11Fence for performance.
And if WebGL support ID3D11Fence, we could check if ID3D11Fence implementation works as expected soon.

chromium implementation does like the following. The BeginAccessDawn() send wait fences to dawn(WebGPU)

GPUQueue::CopyFromCanvasSourceImage()
->WebGPUMailboxTexture::FromStaticBitmapImage()
->WebGPUMailboxTexture::FromCanvasResource()
->WebGPUMailboxTexture::WebGPUMailboxTexture()
->/// ipc
->WebGPUImplementation::AssociateMailbox()
->WebGPUDecoderImpl::HandleAssociateMailboxImmediate()
->WebGPUDecoderImpl::AssociateMailboxDawn()
->DawnImageRepresentation::BeginScopedAccess()
->DawnImageRepresentation::BeginAccess()
->DawnD3DImageRepresentation::BeginAccess()
->D3DImageBacking::BeginAccessDawn()

Flags: needinfo?(sotaro.ikeda.g)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: