From: Erik Faye-Lund Date: Wed, 19 Feb 2020 11:42:38 +0000 (+0100) Subject: gallium/util: do not use debug_print_format X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfea933a2a09b169ff3753de764aa4662de7e4e7;p=mesa.git gallium/util: do not use debug_print_format These are the only two places we use this macro, and it's no longer very gallium-specific. So let's get rid of this, and just use debug_printf and util_format_name directly instead. Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/gallium/auxiliary/util/u_debug_gallium.c b/src/gallium/auxiliary/util/u_debug_gallium.c index 63a1e69c0d4..24f0e9be165 100644 --- a/src/gallium/auxiliary/util/u_debug_gallium.c +++ b/src/gallium/auxiliary/util/u_debug_gallium.c @@ -34,13 +34,6 @@ #ifdef DEBUG -void -debug_print_format(const char *msg, unsigned fmt) -{ - debug_printf("%s: %s\n", msg, util_format_name(fmt)); -} - - /** * Print PIPE_TRANSFER_x flags with a message. */ diff --git a/src/gallium/auxiliary/util/u_debug_gallium.h b/src/gallium/auxiliary/util/u_debug_gallium.h index df4e919c803..f5593406ad6 100644 --- a/src/gallium/auxiliary/util/u_debug_gallium.h +++ b/src/gallium/auxiliary/util/u_debug_gallium.h @@ -35,12 +35,6 @@ extern "C" { #endif -#ifdef DEBUG -void debug_print_format(const char *msg, unsigned fmt); -#else -#define debug_print_format(_msg, _fmt) ((void)0) -#endif - #ifdef DEBUG void diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h index 6eea87ef38c..a395fbc8054 100644 --- a/src/gallium/auxiliary/util/u_pack_color.h +++ b/src/gallium/auxiliary/util/u_pack_color.h @@ -37,7 +37,6 @@ #include "pipe/p_compiler.h" #include "pipe/p_format.h" -#include "util/u_debug_gallium.h" #include "util/format/u_format.h" #include "util/u_math.h" @@ -463,7 +462,8 @@ util_pack_mask_z(enum pipe_format format, uint32_t z) case PIPE_FORMAT_S8_UINT: return 0; default: - debug_print_format("gallium: unhandled format in util_pack_mask_z()", format); + debug_printf("gallium: unhandled format in util_pack_mask_z(): %s\n", + util_format_name(format)); assert(0); return 0; } @@ -559,7 +559,8 @@ util_pack_z(enum pipe_format format, double z) /* this case can get it via util_pack_z_stencil() */ return 0; default: - debug_print_format("gallium: unhandled format in util_pack_z()", format); + debug_printf("gallium: unhandled format in util_pack_z(): %s\n", + util_format_name(format)); assert(0); return 0; }