direct3d11: always lock the D3D11 context on Winstore
authorSteve Lhomme <robux4@videolabs.io>
Tue, 17 May 2016 09:14:30 +0000 (11:14 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 17 May 2016 11:34:47 +0000 (13:34 +0200)
DriverConcurrentCreates is not a good indicator of thread safety

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_output/win32/direct3d11.c

index c140a32..987cb2a 100644 (file)
@@ -1217,13 +1217,8 @@ static int Direct3D11CreateResources(vout_display_t *vd, video_format_t *fmt)
     HRESULT hr;
 
 #if defined(HAVE_ID3D11VIDEODECODER) && VLC_WINSTORE_APP
-    D3D11_FEATURE_DATA_THREADING threading;
-    hr = ID3D11Device_CheckFeatureSupport( sys->d3ddevice, D3D11_FEATURE_THREADING, &threading, sizeof( threading ) );
-    if( FAILED( hr ) || !threading.DriverConcurrentCreates )
-    {
-        sys->context_lock = CreateMutexEx( NULL, NULL, 0, SYNCHRONIZE );
-        ID3D11Device_SetPrivateData( sys->d3ddevice, &GUID_CONTEXT_MUTEX, sizeof( sys->context_lock ), &sys->context_lock );
-    }
+    sys->context_lock = CreateMutexEx( NULL, NULL, 0, SYNCHRONIZE );
+    ID3D11Device_SetPrivateData( sys->d3ddevice, &GUID_CONTEXT_MUTEX, sizeof( sys->context_lock ), &sys->context_lock );
 #endif
 
     hr = UpdateBackBuffer(vd);