Closed Bug 1865984 Opened 2 years ago Closed 5 months ago

Add FenceD3D11 handling to WebGL on Windows

Categories

(Core :: Graphics, enhancement)

Unspecified
Windows
enhancement

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 2 open bugs)

Details

(Keywords: perf-alert)

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)
Summary: Add a capability of handling ID3D11Fence in WebGL → Use ID3D11Fence if supported with WebGL
Type: task → enhancement
OS: Unspecified → Windows
Blocks: 1958602, 1958603
Attachment #9364882 - Attachment description: WIP: Bug 1865984 - Add ID3D11Fence handling to WebGL → WIP: Bug 1865984 - Add FenceD3D11 handling to WebGL on Windows
Summary: Use ID3D11Fence if supported with WebGL → Add FenceD3D11 handling to WebGL on Windows
No longer blocks: 1863474
Duplicate of this bug: 1959385
Attachment #9364882 - Attachment description: WIP: Bug 1865984 - Add FenceD3D11 handling to WebGL on Windows → Bug 1865984 - Add FenceD3D11 handling to WebGL on Windows
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c9c6fcfe2f6 Add FenceD3D11 handling to WebGL on Windows r=gfx-reviewers,lsalzman,aosmond
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch

(In reply to Pulsebot from comment #5)

Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4c9c6fcfe2f6
Add FenceD3D11 handling to WebGL on Windows r=gfx-reviewers,lsalzman,aosmond

Perfherder has detected a talos performance change from push 4c9c6fcfe2f60516f9db5f65fa0ec558b2dc88cc.

If you have any questions, please reach out to a performance sheriff. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
42% glterrain windows11-64-shippable-qr e10s fission stylo webrender-sw 2.79 -> 1.62

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a performance sheriff to do that for you.

You can run all of these tests on try with ./mach try perf --alert 44724

The following documentation link provides more information about this command.

Keywords: perf-alert
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: