mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
freedreno: Initialize debug once
Technically overwriting fd_mesa_debug with the same value should be harmless. But tsan doesn't know this. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40178>
This commit is contained in:
parent
8bfe7b32c9
commit
23d28e605e
1 changed files with 17 additions and 4 deletions
|
|
@ -861,6 +861,22 @@ fd_screen_get_fd(struct pipe_screen *pscreen)
|
|||
return fd_device_fd(screen->dev);
|
||||
}
|
||||
|
||||
static void
|
||||
__debug_init(void)
|
||||
{
|
||||
fd_mesa_debug = debug_get_option_fd_mesa_debug();
|
||||
|
||||
if (FD_DBG(NOBIN))
|
||||
fd_binning_enabled = false;
|
||||
}
|
||||
|
||||
static void
|
||||
fd_screen_debug_init(void)
|
||||
{
|
||||
static util_once_flag once = UTIL_ONCE_FLAG_INIT;
|
||||
util_call_once(&once, __debug_init);
|
||||
}
|
||||
|
||||
struct pipe_screen *
|
||||
fd_screen_create(int fd,
|
||||
const struct pipe_screen_config *config,
|
||||
|
|
@ -874,10 +890,7 @@ fd_screen_create(int fd,
|
|||
struct pipe_screen *pscreen;
|
||||
uint64_t val;
|
||||
|
||||
fd_mesa_debug = debug_get_option_fd_mesa_debug();
|
||||
|
||||
if (FD_DBG(NOBIN))
|
||||
fd_binning_enabled = false;
|
||||
fd_screen_debug_init();
|
||||
|
||||
if (!screen)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue