wined3d: Disable CSMT when fences are not supported.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2022-04-27 13:21:56 +02:00 committed by Alexandre Julliard
parent ab72e33641
commit c99e6b33a3
1 changed files with 9 additions and 0 deletions

View File

@ -3421,6 +3421,15 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device,
if (!(cs->data = heap_alloc(cs->data_size)))
goto fail;
if (wined3d_settings.cs_multithreaded & WINED3D_CSMT_ENABLE)
{
if (!d3d_info->fences)
{
WARN("Disabling CSMT, adapter doesn't support fences.\n");
wined3d_settings.cs_multithreaded &= ~WINED3D_CSMT_ENABLE;
}
}
if (wined3d_settings.cs_multithreaded & WINED3D_CSMT_ENABLE
&& !RtlIsCriticalSectionLockedByThread(NtCurrentTeb()->Peb->LoaderLock))
{