Closed Bug 1567347 Opened 1 year ago Closed 1 year ago

Add option of using SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition on WebRender

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

There is a case that helps if we have an option for using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition. It helps to understand if a problem exists to DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL or DirectComposition. Like Bug 1556634.

Assignee: nobody → sotaro.ikeda.g
Summary: Add option for using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition → Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition
Attachment #9079204 - Attachment description: Bug 1567347 - Add option for using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition → Bug 1567347 - Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition
See Also: → 1556634
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6332d065c048
Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition r=nical
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

So with this turned on, we should be presenting the same way with WebRender on vs. WebRender off right? That suggests that there's something else different between having WebRender on that's causing the problem in bug 1556634? Could it be related to having a depth buffer?

Flags: needinfo?(sotaro.ikeda.g)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)

So with this turned on, we should be presenting the same way with WebRender on vs. WebRender off right?

No. We could compare between

  • WebRender on, DirectComposition on, SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, Compositor window
  • WebRender on, DirectComposition off, SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, Compositor window

That suggests that there's something else different between having WebRender on that's causing the problem in bug 1556634?

It checks that if the problem is caused by DirectComposition usage or by SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage. With the patch, the problem of bug 1556634 still happened. Then SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage seemed to trigger the problem.

Could it be related to having a depth buffer?

The patch is not related to depth buffer. It checks that if the problem is triggered by DirectComposition usage or by SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage.

Flags: needinfo?(sotaro.ikeda.g)
Summary: Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition → Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition on WebRender
Summary: Add option of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition on WebRender → Add option of using SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL without DirectComposition on WebRender

(In reply to Sotaro Ikeda [:sotaro] from comment #5)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)

So with this turned on, we should be presenting the same way with WebRender on vs. WebRender off right?

To turn on it, the following pref changes are necessary.

  • gfx.webrender.dcomp-win.enabled:false
  • gfx.webrender.flip-sequential:true

(In reply to Sotaro Ikeda [:sotaro] from comment #5)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)

So with this turned on, we should be presenting the same way with WebRender on vs. WebRender off right?

No. We could compare between

  • WebRender on, DirectComposition on, SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, Compositor window
  • WebRender on, DirectComposition off, SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, Compositor window

But can't we also compare with:
WebRender off, DirectComposition off, SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, Compositor window?

(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)

But can't we also compare with:
WebRender off, DirectComposition off, SwapChain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, Compositor window?

We could do it already with nightly like the followings.

  • CompositorD3D11 with double buffering(DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL)
  • Direct3D 11 (Advanced Layers) with double buffering(DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL)

The double buffering with Compositor could be enabled with pref gfx.direct3d11.use-double-buffering:true and Win 10.

I did not see the problem with these settings. From Comment 5 and the symptom, I am going to think that the problem might be related to ID3D11Texture2D recycling. WebRender recycles GL Textures(backed by ID3D11Texture2D???) between frames. But Compositor does not recycle ID3D11Texture2D for each Composition. Compositor waits end of usage of ID3D11Texture2D by gpu before re-using ID3D11Texture2D by client.

You need to log in before you can comment on or make changes to this bug.