Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/d2d1/d2d1_private.h | 1 + dlls/d2d1/device.c | 8 ++++++++ 2 files changed, 9 insertions(+)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 7211029d920..153113cafa9 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -540,6 +540,7 @@ struct d2d_device ID2D1Factory1 *factory; IDXGIDevice *dxgi_device; ID3D10Device *d3d10_device; + ID3D10Multithread *d3d10_mt; };
void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *factory, IDXGIDevice *dxgi_device) DECLSPEC_HIDDEN; diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 3c33fba0e56..acbcab5caeb 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -4126,6 +4126,7 @@ static ULONG WINAPI d2d_device_Release(ID2D1Device *iface)
if (!refcount) { + if (device->d3d10_mt) ID3D10Multithread_Release(device->d3d10_mt); if (device->d3d10_device) ID3D10Device_Release(device->d3d10_device); IDXGIDevice_Release(device->dxgi_device); ID2D1Factory1_Release(device->factory); @@ -4233,6 +4234,13 @@ void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *iface, IDXGIDevic device->dxgi_device = dxgi_device; IDXGIDevice_AddRef(device->dxgi_device);
+ if (FAILED(hr = IDXGIDevice_QueryInterface(device->dxgi_device, + &IID_ID3D10Multithread, (void **)&device->d3d10_mt))) + { + WARN("Failed to get ID3D10Multithread interface, hr %#x.\n", hr); + device->d3d10_mt = NULL; + } + if (FAILED(hr = IDXGIDevice_QueryInterface(device->dxgi_device, &IID_ID3D10Device, (void **)&device->d3d10_device))) {