llvmpipe: Do not use _Atomic keyword that doesn't support by MSVC

Fixes: 3269d34b29 ("llvmpipe/fence: make the fence id counter atomic")

Fixes:
```
../mesa/src/gallium/drivers/llvmpipe/lp_fence.c
../mesa/src/gallium/drivers/llvmpipe/lp_fence.c(47): error C2143: syntax error: missing ';' before 'type'
```

fence_id initialized to 0

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Erik Faye-Lund <erik.faye-lund@collabora.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16373>
This commit is contained in:
Yonggang Luo 2022-05-11 07:33:41 +08:00 committed by Marge Bot
parent 57b353ec6a
commit 9baaf055e2

View file

@ -44,7 +44,7 @@
struct lp_fence *
lp_fence_create(unsigned rank)
{
static _Atomic int fence_id;
static unsigned fence_id = 0;
struct lp_fence *fence = CALLOC_STRUCT(lp_fence);
if (!fence)
@ -55,7 +55,7 @@ lp_fence_create(unsigned rank)
(void) mtx_init(&fence->mutex, mtx_plain);
cnd_init(&fence->signalled);
fence->id = fence_id++;
fence->id = p_atomic_inc_return(&fence_id) - 1;
fence->rank = rank;
if (LP_DEBUG & DEBUG_FENCE)