Bug 1175104 - Enable multithread support on our d3d11 content device. r=Bas, a=lmandel
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 24 Apr 2015 15:30:46 +1200
changeset 275267 8f7c8943ffe72f021183a26c6488d60a915249cc
parent 275266 7f27d50242f695dac61626670650d25ccaab5b34
child 275268 53763147728beeddb978cc74ca499adde0514efc
child 275269 df9985e26f683be9986c6c1d5d96e3f3b21bab08
child 275271 6c56ed2b4546bc347a1eb5c544cb3c8d367d1729
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, lmandel
bugs1175104
milestone40.0
Bug 1175104 - Enable multithread support on our d3d11 content device. r=Bas, a=lmandel
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -2022,16 +2022,20 @@ gfxWindowsPlatform::InitD3D11Devices()
 
     if (FAILED(hr)) {
       d3d11Module.disown();
       return;
     }
 
     mD3D11ContentDevice->SetExceptionMode(0);
 
+    nsRefPtr<ID3D10Multithread> multi;
+    mD3D11ContentDevice->QueryInterface(__uuidof(ID3D10Multithread), getter_AddRefs(multi));
+    multi->SetMultithreadProtected(TRUE);
+
     Factory::SetDirect3D11Device(mD3D11ContentDevice);
   }
 
   if (!useWARP) {
     hr = E_INVALIDARG;
 
     MOZ_SEH_TRY{
       hr = d3d11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,