Closed Bug 1843891 Opened 1 year ago Closed 3 months ago

Present WebGPU without readback on Windows

Categories

(Core :: Graphics: WebGPU, enhancement)

Unspecified
Windows
enhancement

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Depends on 2 open bugs, Blocks 2 open bugs)

Details

Attachments

(6 files, 5 obsolete files)

For now, gecko does readback to present WebGPU on all platforms. It is not good.

On Windows, we expected to use DX12 by default.
Since Bug 1805209 fix, WebGPU present uses RemoteTexture.

Assignee: nobody → sotaro.ikeda.g
See Also: → 1805209

From chromium's implementation, it seems possible interoperate between ID3D11Texture2D and DX12. It is implemented around D3DImageBacking.

On gecko, one webgpu::Texture is reused in CanvasContext::GetCurrentTexture(). It seems better to use different Texture when Texture is posted to WebRender.

On chromium, WebGPUSwapBufferProvider manages SharedImage allocation and recycling.

Attachment #9344250 - Attachment description: Diagram around D3DImageBacking → Diagram around chromium's D3DImageBacking

It is just current rough idea. It should be changed with more investigations.

:sotaro: What is the relation of this bug's scope to bug 1708025? I see mention of readback there, but I'm unclear if that's tangential or not.

CC :jimb, :jgilbert.

bug 1708025 just mentioned about RenderD3D11TextureHost. Then it could be dup of this bug.

Duplicate of this bug: 1708025
Attachment #9345930 - Attachment is obsolete: true
Depends on: 1845643
Attachment #9344252 - Attachment is obsolete: true
Attachment #9345930 - Attachment is obsolete: false
Attachment #9345930 - Attachment is obsolete: true
Attachment #9346092 - Attachment description: Idea of present WebGPU without readback → Idea of present WebGPU without readback with DX12

This bug appears to be receiving active effort from Sotaro. :sotaro, is the intent to resolve this bug fully within the next release or so? I'm assuming so, but I wanted to double-check.

Tentatively marking as P1 to indicate this, but feel free to correct.

Depends on: 1845853

early stage of implementation.

Yes, Sotaro is working on this, and we're expecting it to be done within 2023H2, but we don't have a specific release as an ETA.

P1 seems appropriate.

Depends on: 1851547
Depends on: 1852485
Depends on: 1854541
Depends on: 1856787
Attachment #9346968 - Attachment is obsolete: true
OS: Unspecified → Windows
Depends on: 1859969
Attachment #9359277 - Attachment is obsolete: true
Depends on: 1860735
Depends on: 1860958
Depends on: 1863474
Depends on: 1863872
Depends on: 1876389
Depends on: 1879284
Depends on: 1880005
Depends on: 1879694
Depends on: 1885500
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/122147bb13ec
Enable to present WebGPU without readback with DX12 on Windows r=webgpu-reviewers,nical
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: