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>
This commit is contained in:
Piotr Caban 2020-09-15 12:19:29 +02:00 committed by Alexandre Julliard
parent 14c6933f3f
commit ff1a4e0624
1 changed files with 4 additions and 0 deletions

View File

@ -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;