asahi: Fix disk cache disable with AGX_MESA_DEBUG
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 24 Apr 2023 02:10:34 +0000 (22:10 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 7 May 2023 13:00:40 +0000 (09:00 -0400)
commite9b471d1b368e5fa8d9fa477522564bc3e988ab8
tree990b9ece03ce46c87c9c15c03da9f8d01c760e7a
parentfdec9f9c6b7744b54ff04a8cde72c6944c023167
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: 5e9538c12e0 ("agx: isolate compiler debug flags")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
src/asahi/compiler/agx_compile.c
src/asahi/compiler/agx_compiler.h
src/asahi/compiler/agx_debug.h
src/gallium/drivers/asahi/agx_disk_cache.c