summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <cgmeiner@igalia.com>2023-06-07 11:16:43 +0200
committerMarge Bot <emma+marge@anholt.net>2023-06-08 10:09:14 +0000
commitae828a33a74c5b3fc6abee481eac7cb57bf815d0 (patch)
tree3043f926b7c0c11660f477778ec5d3f12dcee7bf
parent14782cf2480f12ee5da15b2c22157fdaa987d91a (diff)
etnaviv: make wider use of DBG_ENABLED(..)
Make the source code more consistent. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23495>
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_debug.h4
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_disk_cache.c2
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_shader.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h b/src/gallium/drivers/etnaviv/etnaviv_debug.h
index 61543f07e1e..3bcd15f6d0a 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_debug.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h
@@ -64,14 +64,14 @@ extern int etna_mesa_debug; /* set in etnaviv_screen.c from ETNA_MESA_DEBUG */
#define DBG_F(flag, fmt, ...) \
do { \
- if (etna_mesa_debug & (flag)) \
+ if (DBG_ENABLED(flag)) \
mesa_logd("%s:%d: " fmt, __func__, __LINE__, \
##__VA_ARGS__); \
} while (0)
#define DBG(fmt, ...) \
do { \
- if (etna_mesa_debug & ETNA_DBG_MSGS) \
+ if (DBG_ENABLED(ETNA_DBG_MSGS)) \
mesa_logd("%s:%d: " fmt, __func__, __LINE__, \
##__VA_ARGS__); \
} while (0)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c b/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c
index f503f923906..7d43fe0560a 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c
@@ -34,7 +34,7 @@
void
etna_disk_cache_init(struct etna_compiler *compiler, const char *renderer)
{
- if (etna_mesa_debug & ETNA_DBG_NOCACHE)
+ if (DBG_ENABLED(ETNA_DBG_NOCACHE))
return;
const struct build_id_note *note =
diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c
index 721624abde9..75b95b00c74 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_shader.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c
@@ -373,7 +373,7 @@ etna_shader_stage(struct etna_shader_variant *shader)
static void
dump_shader_info(struct etna_shader_variant *v, struct util_debug_callback *debug)
{
- if (!unlikely(etna_mesa_debug & ETNA_DBG_SHADERDB))
+ if (!DBG_ENABLED(ETNA_DBG_SHADERDB))
return;
util_debug_message(debug, SHADER_INFO,
@@ -465,7 +465,7 @@ etna_shader_variant(struct etna_shader *shader,
static inline bool
initial_variants_synchronous(struct etna_context *ctx)
{
- return unlikely(ctx->base.debug.debug_message) || (etna_mesa_debug & ETNA_DBG_SHADERDB);
+ return unlikely(ctx->base.debug.debug_message) || DBG_ENABLED(ETNA_DBG_SHADERDB);
}
static void