diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 1e18806caac..43de92bb48a 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -39,6 +39,12 @@ DEBUG_GET_ONCE_FLAGS_OPTION(agx_compiler_debug, "AGX_MESA_DEBUG", int agx_compiler_debug = 0; +uint64_t +agx_get_compiler_debug(void) +{ + return debug_get_option_agx_compiler_debug(); +} + #define DBG(fmt, ...) \ do { \ if (agx_compiler_debug & AGX_DBG_MSGS) \ @@ -2360,7 +2366,7 @@ agx_compile_shader_nir(nir_shader *nir, struct agx_shader_key *key, struct util_dynarray *binary, struct agx_shader_info *out) { - agx_compiler_debug = debug_get_option_agx_compiler_debug(); + agx_compiler_debug = agx_get_compiler_debug(); memset(out, 0, sizeof *out); diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index d04e551781f..9004c3065f7 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -809,6 +809,8 @@ struct agx_occupancy { struct agx_occupancy agx_occupancy_for_register_count(unsigned halfregs); +extern int agx_compiler_debug; + #ifdef __cplusplus } /* extern C */ #endif diff --git a/src/asahi/compiler/agx_debug.h b/src/asahi/compiler/agx_debug.h index 797d7c4f060..16ff089deec 100644 --- a/src/asahi/compiler/agx_debug.h +++ b/src/asahi/compiler/agx_debug.h @@ -27,7 +27,7 @@ enum agx_compiler_dbg { }; /* clang-format on */ -extern int agx_compiler_debug; +uint64_t agx_get_compiler_debug(void); #ifdef __cplusplus } /* extern C */ diff --git a/src/gallium/drivers/asahi/agx_disk_cache.c b/src/gallium/drivers/asahi/agx_disk_cache.c index d832a4e98c1..2ec2fc95e14 100644 --- a/src/gallium/drivers/asahi/agx_disk_cache.c +++ b/src/gallium/drivers/asahi/agx_disk_cache.c @@ -134,7 +134,7 @@ void agx_disk_cache_init(struct agx_screen *screen) { #ifdef ENABLE_SHADER_CACHE - if (agx_compiler_debug || screen->dev.debug) + if (agx_get_compiler_debug() || screen->dev.debug) return; const char *renderer = screen->pscreen.get_name(&screen->pscreen);