Closed Bug 1345648 Opened 5 years ago Closed 5 years ago

AMD calls ID3D10Device::Flush in NV_dx_interop2 even in d3d11 mode

Categories

(Core :: Canvas: WebGL, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
platform-rel --- ?
firefox55 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

(Whiteboard: [platform-rel-AMD])

Attachments

(2 files)

This is invalid.
Comment on attachment 8845159 [details]
Bug 1345648 - Use ID3DDeviceContextState to support NV_dx_interop2 on D3D11 on AMD -

https://reviewboard.mozilla.org/r/118362/#review120212

Got a few issues to address

::: gfx/gl/SharedSurfaceD3D11Interop.cpp:237
(Diff revision 1)
>                            GLenum access) const
>      {
>          if (!mGL->MakeCurrent())
>              return nullptr;
>  
> -        const auto& ret = mWGL->mSymbols.fDXRegisterObjectNV(mInteropDevice, d3dObject,
> +        const ScopedContextState autoCS(mD3DContext, mContextState);

On non-AMD, we'll have `mD3DContext` and `mContextState` NULL. It doesn't appear that `ScopedContextState` handles that properly.

::: gfx/thebes/DeviceManagerDx.cpp:406
(Diff revision 1)
> +    if(!SUCCEEDED( debug->QueryInterface(__uuidof(ID3D11InfoQueue), getter_AddRefs(infoQueue)) ))
> +      break;
> +
> +    infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_CORRUPTION, true);
> +    infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true);
> +    infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_WARNING, true);

this might be a little too strict, but I assume you ran with it already so we don't expect that many warnings
Attachment #8845159 - Flags: review?(kvark) → review-
platform-rel: --- → ?
Whiteboard: [platform-rel-AMD]
Comment on attachment 8845159 [details]
Bug 1345648 - Use ID3DDeviceContextState to support NV_dx_interop2 on D3D11 on AMD -

https://reviewboard.mozilla.org/r/118362/#review120212

> On non-AMD, we'll have `mD3DContext` and `mContextState` NULL. It doesn't appear that `ScopedContextState` handles that properly.

Both ctor and dtor for ScopedContextState do:

        if (!mD3DContext)
            return;

> this might be a little too strict, but I assume you ran with it already so we don't expect that many warnings

That's for spewing when debugging. I split it into a separate patch and disabled it by default.
Comment on attachment 8845193 [details]
Bug 1345648 - Add BREAK_ON_D3D_ERROR to DeviceManagerDx -

https://reviewboard.mozilla.org/r/118382/#review120232
Attachment #8845193 - Flags: review?(kvark) → review+
Comment on attachment 8845159 [details]
Bug 1345648 - Use ID3DDeviceContextState to support NV_dx_interop2 on D3D11 on AMD -

https://reviewboard.mozilla.org/r/118362/#review120234
Attachment #8845159 - Flags: review?(kvark) → review+
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6bfe6b49c1af
Use ID3DDeviceContextState to support NV_dx_interop2 on D3D11 on AMD - r=kvark
https://hg.mozilla.org/integration/mozilla-inbound/rev/2c94e07a4334
Add BREAK_ON_D3D_ERROR to DeviceManagerDx - r=kvark
https://hg.mozilla.org/mozilla-central/rev/6bfe6b49c1af
https://hg.mozilla.org/mozilla-central/rev/2c94e07a4334
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.