Module: wine Branch: master Commit: ff1a4e06241e1793ab61e1ae8f7830e4d3182c00 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ff1a4e06241e1793ab61e1ae8...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Sep 15 12:19:29 2020 +0200
d3d9: Lock wined3d mutex in d3d9_device_CreateTexture().
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3d9/device.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index b92193d46f..fec631e0e6 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1345,9 +1345,13 @@ static HRESULT WINAPI d3d9_device_CreateTexture(IDirect3DDevice9Ex *iface, }
if (set_mem) + { + wined3d_mutex_lock(); wined3d_texture_update_desc(object->wined3d_texture, 0, width, height, wined3dformat_from_d3dformat(format), WINED3D_MULTISAMPLE_NONE, 0, *shared_handle, 0); + wined3d_mutex_unlock(); + }
TRACE("Created texture %p.\n", object); *texture = (IDirect3DTexture9 *)&object->IDirect3DBaseTexture9_iface;