[PATCH 5/8] wined3d: Protect access to the Vulkan wined3d_allocator with a critical section.

Henri Verbeet hverbeet at gmail.com
Wed Nov 3 12:11:17 CDT 2021


On Wed, 3 Nov 2021 at 00:37, Zebediah Figura <zfigura at codeweavers.com> wrote:
> @@ -312,23 +312,36 @@ static struct wined3d_allocator_block *wined3d_device_vk_allocate_memory(struct
>      struct wined3d_allocator *allocator = &device_vk->allocator;
>      struct wined3d_allocator_block *block;
>
> +    EnterCriticalSection(&device_vk->allocator_cs);
> +
We'd typically wrap the EnterCriticalSection() call in something like
wined3d_device_vk_allocator_lock(). Mostly because that's a little
easier to search for than an EnterCriticalSection() call with a
specific critical section in some cases, but I suppose it would also
make it slightly easier to replace the critical section with something
else, if needed.



More information about the wine-devel mailing list