From c667a5b95dd971629784b26adf13bd6b211f6f55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 14 Feb 2010 13:26:51 +0000 Subject: [PATCH] util: Use util_format_name(). --- src/gallium/auxiliary/util/u_debug.c | 119 +-------------------------- 1 file changed, 1 insertion(+), 118 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index 4821b8a1434..688083d2325 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -288,130 +288,13 @@ debug_dump_flags(const struct debug_named_value *names, } -static const struct debug_named_value pipe_format_names[] = { -#ifdef DEBUG - DEBUG_NAMED_VALUE(PIPE_FORMAT_NONE), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A8R8G8B8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_X8R8G8B8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_B8G8R8A8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_B8G8R8X8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A1R5G5B5_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A4R4G4B4_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R5G6B5_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A2B10G10R10_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_L8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_I8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A8L8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_L16_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_YCBCR), - DEBUG_NAMED_VALUE(PIPE_FORMAT_YCBCR_REV), - DEBUG_NAMED_VALUE(PIPE_FORMAT_Z16_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_Z32_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_Z32_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_S8Z24_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_Z24S8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_X8Z24_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_Z24X8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_S8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R64_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R64G64_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R64G64B64_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R64G64B64A64_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32A32_FLOAT), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32A32_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32A32_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32A32_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R32G32B32A32_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16A16_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16A16_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16A16_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R16G16B16A16_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8A8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8X8_UNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8A8_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8X8_USCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8A8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8X8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_B6G5R5_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A8B8G8R8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_X8B8G8R8_SNORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8A8_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8X8_SSCALED), - DEBUG_NAMED_VALUE(PIPE_FORMAT_L8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A8L8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8A8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_R8G8B8X8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_A8R8G8B8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_X8R8G8B8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_B8G8R8A8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_B8G8R8X8_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_X8UB8UG8SR8S_NORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_B6UG5SR5S_NORM), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT1_RGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT1_RGBA), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT3_RGBA), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT5_RGBA), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT1_SRGB), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT1_SRGBA), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT3_SRGBA), - DEBUG_NAMED_VALUE(PIPE_FORMAT_DXT5_SRGBA), -#endif - DEBUG_NAMED_VALUE_END -}; - #ifdef DEBUG void debug_print_format(const char *msg, unsigned fmt ) { - debug_printf("%s: %s\n", msg, debug_dump_enum(pipe_format_names, fmt)); + debug_printf("%s: %s\n", msg, util_format_name(fmt)); } #endif -const char *pf_name( enum pipe_format format ) -{ - return debug_dump_enum(pipe_format_names, format); -} - static const struct debug_named_value pipe_prim_names[] = { -- 2.30.2