mesa/src/asahi/compiler/agx_debug.h
Alyssa Rosenzweig e9b471d1b3 asahi: Fix disk cache disable with AGX_MESA_DEBUG
We go to initialize the disk cache before we've compiled any shaders so
agx_compiler_debug is 0 at this point. Don't try to read it, instead go through
sa safe getter that will do the right thing.

Fixes: 5e9538c12e ("agx: isolate compiler debug flags")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
2023-05-07 09:00:40 -04:00

36 lines
762 B
C

/*
* Copyright 2021 Alyssa Rosenzweig
* Copyright 2020 Collabora Ltd.
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_DEBUG_H
#define __AGX_DEBUG_H
#include "util/macros.h"
#ifdef __cplusplus
extern "C" {
#endif
/* clang-format off */
enum agx_compiler_dbg {
AGX_DBG_MSGS = BITFIELD_BIT(0),
AGX_DBG_SHADERS = BITFIELD_BIT(1),
AGX_DBG_SHADERDB = BITFIELD_BIT(2),
AGX_DBG_VERBOSE = BITFIELD_BIT(3),
AGX_DBG_INTERNAL = BITFIELD_BIT(4),
AGX_DBG_NOVALIDATE = BITFIELD_BIT(5),
AGX_DBG_NOOPT = BITFIELD_BIT(6),
AGX_DBG_WAIT = BITFIELD_BIT(7),
AGX_DBG_NOPREAMBLE = BITFIELD_BIT(8),
};
/* clang-format on */
uint64_t agx_get_compiler_debug(void);
#ifdef __cplusplus
} /* extern C */
#endif
#endif