mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
llvmpipe/fence: make the fence id counter atomic
Multiple threads can race on the function static variable Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16348>
This commit is contained in:
parent
8cc1889b09
commit
3269d34b29
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@
|
|||
struct lp_fence *
|
||||
lp_fence_create(unsigned rank)
|
||||
{
|
||||
static int fence_id;
|
||||
static _Atomic int fence_id;
|
||||
struct lp_fence *fence = CALLOC_STRUCT(lp_fence);
|
||||
|
||||
if (!fence)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue