util: fix stack dynarray used by multiple tus

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23106>
This commit is contained in:
Georg Lehmann
2023-04-05 11:55:51 +02:00
committed by Marge Bot
parent 4af6b601e0
commit 12d5a2aa97
3 changed files with 10 additions and 1 deletions

View File

@@ -135,6 +135,7 @@ files_mesa_util = files(
'u_debug_refcnt.h',
'u_dl.c',
'u_dl.h',
'u_dynarray.c',
'u_dynarray.h',
'u_endian.h',
'u_hash_table.c',

8
src/util/u_dynarray.c Normal file
View File

@@ -0,0 +1,8 @@
/*
* Copyright 2023 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#include "u_dynarray.h"
unsigned util_dynarray_is_data_stack_allocated;

View File

@@ -36,7 +36,7 @@
extern "C" {
#endif
static unsigned util_dynarray_is_data_stack_allocated;
extern unsigned util_dynarray_is_data_stack_allocated;
/* A zero-initialized version of this is guaranteed to represent an
* empty array.