[vlc-commits] direct3d11: don't request specific feature levels
Steve Lhomme
git at videolan.org
Tue May 2 10:06:48 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Apr 28 17:46:17 2017 +0200| [2108877cc8d01128b2970bbf1b1f2fae34c94ace] | committer: Jean-Baptiste Kempf
direct3d11: don't request specific feature levels
Windows 7 doesn't give a proper device otherwise. We don't use any specific
feature above 11 so we let the OS/driver decide what's best.
Close #18237
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2108877cc8d01128b2970bbf1b1f2fae34c94ace
---
modules/video_output/win32/direct3d11.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f58cbb3854..f3cbd62b5d 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1537,20 +1537,6 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
//scd.Flags = 512; // DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO;
scd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
- IDXGIAdapter *dxgiadapter;
- static const D3D_FEATURE_LEVEL featureLevels[] =
- {
- 0xc000 /* D3D_FEATURE_LEVEL_12_1 */,
- 0xc100 /* D3D_FEATURE_LEVEL_12_0 */,
- D3D_FEATURE_LEVEL_11_1,
- D3D_FEATURE_LEVEL_11_0,
- D3D_FEATURE_LEVEL_10_1,
- D3D_FEATURE_LEVEL_10_0,
- D3D_FEATURE_LEVEL_9_3,
- D3D_FEATURE_LEVEL_9_2,
- D3D_FEATURE_LEVEL_9_1,
- };
-
static const D3D_DRIVER_TYPE driverAttempts[] = {
D3D_DRIVER_TYPE_HARDWARE,
D3D_DRIVER_TYPE_WARP,
@@ -1562,7 +1548,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
for (UINT driver = 0; driver < ARRAYSIZE(driverAttempts); driver++) {
D3D_FEATURE_LEVEL i_feature_level;
hr = D3D11CreateDevice(NULL, driverAttempts[driver], NULL, creationFlags,
- featureLevels, 6, D3D11_SDK_VERSION,
+ NULL, 0, D3D11_SDK_VERSION,
&sys->d3ddevice, &i_feature_level, &sys->d3dcontext);
if (SUCCEEDED(hr)) {
#ifndef NDEBUG
@@ -1579,7 +1565,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
return VLC_EGENERIC;
}
- dxgiadapter = D3D11DeviceAdapter(sys->d3ddevice);
+ IDXGIAdapter *dxgiadapter = D3D11DeviceAdapter(sys->d3ddevice);
if (FAILED(hr)) {
msg_Err(vd, "Could not get the DXGI Adapter");
return VLC_EGENERIC;
More information about the vlc-commits
mailing list