From 5784381b1e8a7f7535bbd5cc1672770026662bb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 14 Feb 2010 13:23:32 +0000 Subject: [PATCH] util: Add pf_name() replacement: util_format_name(). --- src/gallium/auxiliary/util/u_format.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index 4323bc8..2fbbb83 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -156,6 +156,19 @@ util_format_description(enum pipe_format format); * Format query functions. */ +static INLINE const char * +util_format_name(enum pipe_format format) +{ + const struct util_format_description *desc = util_format_description(format); + + assert(format); + if (!format) { + return "???"; + } + + return desc->name; +} + static INLINE boolean util_format_is_compressed(enum pipe_format format) { -- 2.7.4