diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-22 13:14:13 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-22 13:14:13 +0300 |
commit | f7abe27be3ec8345af8e02eb9a267f1f1dc3170d (patch) | |
tree | 62169f9eb2202db4fb2d4678c205a5df23f7a8e7 /decoder/LAVVideo | |
parent | cbec06be50cfb4215535d18ab67c1ba91486c31d (diff) |
d3d11: create the device with BGRA support for Direct2D interoperability
Related to GitHub ticket #153.
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r-- | decoder/LAVVideo/decoders/d3d11va.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/LAVVideo/decoders/d3d11va.cpp b/decoder/LAVVideo/decoders/d3d11va.cpp index 9e107c2b..27f939b0 100644 --- a/decoder/LAVVideo/decoders/d3d11va.cpp +++ b/decoder/LAVVideo/decoders/d3d11va.cpp @@ -265,8 +265,11 @@ enum_adapter: } } + // Create a device with video support, and BGRA support for Direct2D interoperability (drawing UI, etc) + UINT nCreationFlags = D3D11_CREATE_DEVICE_VIDEO_SUPPORT | D3D11_CREATE_DEVICE_BGRA_SUPPORT; + D3D_FEATURE_LEVEL d3dFeatureLevel; - hr = dx.mD3D11CreateDevice(pDXGIAdapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_VIDEO_SUPPORT, s_D3D11Levels, countof(s_D3D11Levels), D3D11_SDK_VERSION, &pD3D11Device, &d3dFeatureLevel, nullptr); + hr = dx.mD3D11CreateDevice(pDXGIAdapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, nCreationFlags, s_D3D11Levels, countof(s_D3D11Levels), D3D11_SDK_VERSION, &pD3D11Device, &d3dFeatureLevel, nullptr); if (FAILED(hr)) { if (nDeviceIndex != 0) |