Ensure D3D11 sync texture never deadlocks

RESOLVED FIXED in mozilla37

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Tracking

unspecified
mozilla37
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
It would be nice to make 100% sure we're never deadlocking people on the D3D11 sync texture amongst our users. We can do this by setting a sufficiently long timeout and crashing when it expires.
(Assignee)

Comment 1

4 years ago
Created attachment 8546728 [details] [diff] [review]
bug1119854
Attachment #8546728 - Flags: review?(jmuizelaar)
(Assignee)

Comment 2

4 years ago
Comment on attachment 8546728 [details] [diff] [review]
bug1119854

Review of attachment 8546728 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/d3d11/TextureD3D11.cpp
@@ +785,5 @@
>  
>    if (mD3D11SyncedTextures.size()) {
>      RefPtr<IDXGIKeyedMutex> mutex;
>      hr = mD3D11Texture->QueryInterface((IDXGIKeyedMutex**)byRef(mutex));
> +    mutex->AcquireSync(0, 10000);

I fixed this...
Comment on attachment 8546728 [details] [diff] [review]
bug1119854

Review of attachment 8546728 [details] [diff] [review]:
-----------------------------------------------------------------

There's another AcquireSync in SharedSurfaceANGLE
Attachment #8546728 - Flags: review?(jmuizelaar) → review+
Bas: did you forget to change this AcquireSync(0, INFINITE) to AcquireSync(0, 10000) in the SharedSurfaceANGLE.cpp patch you landed?

https://hg.mozilla.org/integration/mozilla-inbound/diff/18bc11b32f6f/gfx/gl/SharedSurfaceANGLE.cpp#l1.15
Flags: needinfo?(bas)
(Assignee)

Comment 5

4 years ago
(In reply to Chris Peterson [:cpeterson] from comment #4)
> Bas: did you forget to change this AcquireSync(0, INFINITE) to
> AcquireSync(0, 10000) in the SharedSurfaceANGLE.cpp patch you landed?
> 
> https://hg.mozilla.org/integration/mozilla-inbound/diff/18bc11b32f6f/gfx/gl/
> SharedSurfaceANGLE.cpp#l1.15

You're right, thank you.
Flags: needinfo?(bas)
https://hg.mozilla.org/mozilla-central/rev/18bc11b32f6f
https://hg.mozilla.org/mozilla-central/rev/ee29d84c968a
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37

Updated

4 years ago
Depends on: 1133623
You need to log in before you can comment on or make changes to this bug.