Mesa (master): gallium/util: do not use debug_print_format
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 25 00:02:13 UTC 2020
Module: Mesa
Branch: master
Commit: dfea933a2a09b169ff3753de764aa4662de7e4e7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dfea933a2a09b169ff3753de764aa4662de7e4e7
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Wed Feb 19 12:42:38 2020 +0100
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 <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3901>
---
src/gallium/auxiliary/util/u_debug_gallium.c | 7 -------
src/gallium/auxiliary/util/u_debug_gallium.h | 6 ------
src/gallium/auxiliary/util/u_pack_color.h | 7 ++++---
3 files changed, 4 insertions(+), 16 deletions(-)
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;
}
More information about the mesa-commit
mailing list