From 47f0529806cff6be84ce4d3637aad4f2e3e0693a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 25 Oct 2009 12:26:39 +0000 Subject: util: Human readable output of texture states. --- src/gallium/auxiliary/util/u_debug_dump.c | 80 +++++++++++++++++++++++++++++++ src/gallium/auxiliary/util/u_debug_dump.h | 12 +++++ 2 files changed, 92 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/auxiliary/util/u_debug_dump.c b/src/gallium/auxiliary/util/u_debug_dump.c index 6bdecde048..09866880ae 100644 --- a/src/gallium/auxiliary/util/u_debug_dump.c +++ b/src/gallium/auxiliary/util/u_debug_dump.c @@ -187,3 +187,83 @@ debug_dump_func_short_names[] = { }; DEFINE_DEBUG_DUMP_CONTINUOUS(func) + + +static const char * +debug_dump_tex_target_names[] = { + "PIPE_TEXTURE_1D", + "PIPE_TEXTURE_2D", + "PIPE_TEXTURE_3D", + "PIPE_TEXTURE_CUBE" +}; + +static const char * +debug_dump_tex_target_short_names[] = { + "1d", + "2d", + "3d", + "cube" +}; + +DEFINE_DEBUG_DUMP_CONTINUOUS(tex_target) + + +static const char * +debug_dump_tex_wrap_names[] = { + "PIPE_TEX_WRAP_REPEAT", + "PIPE_TEX_WRAP_CLAMP", + "PIPE_TEX_WRAP_CLAMP_TO_EDGE", + "PIPE_TEX_WRAP_CLAMP_TO_BORDER", + "PIPE_TEX_WRAP_MIRROR_REPEAT", + "PIPE_TEX_WRAP_MIRROR_CLAMP", + "PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE", + "PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER" +}; + +static const char * +debug_dump_tex_wrap_short_names[] = { + "repeat", + "clamp", + "clamp_to_edge", + "clamp_to_border", + "mirror_repeat", + "mirror_clamp", + "mirror_clamp_to_edge", + "mirror_clamp_to_border" +}; + +DEFINE_DEBUG_DUMP_CONTINUOUS(tex_wrap) + + +static const char * +debug_dump_tex_mipfilter_names[] = { + "PIPE_TEX_MIPFILTER_NEAREST", + "PIPE_TEX_MIPFILTER_LINEAR", + "PIPE_TEX_MIPFILTER_NONE" +}; + +static const char * +debug_dump_tex_mipfilter_short_names[] = { + "nearest", + "linear", + "none" +}; + +DEFINE_DEBUG_DUMP_CONTINUOUS(tex_mipfilter) + + +static const char * +debug_dump_tex_filter_names[] = { + "PIPE_TEX_FILTER_NEAREST", + "PIPE_TEX_FILTER_LINEAR", + "PIPE_TEX_FILTER_ANISO" +}; + +static const char * +debug_dump_tex_filter_short_names[] = { + "nearest", + "linear", + "aniso" +}; + +DEFINE_DEBUG_DUMP_CONTINUOUS(tex_filter) diff --git a/src/gallium/auxiliary/util/u_debug_dump.h b/src/gallium/auxiliary/util/u_debug_dump.h index 102935559c..19b130ad18 100644 --- a/src/gallium/auxiliary/util/u_debug_dump.h +++ b/src/gallium/auxiliary/util/u_debug_dump.h @@ -54,6 +54,18 @@ debug_dump_blend_func(unsigned value, boolean shortened); const char * debug_dump_func(unsigned value, boolean shortened); +const char * +debug_dump_tex_target(unsigned value, boolean shortened); + +const char * +debug_dump_tex_wrap(unsigned value, boolean shortened); + +const char * +debug_dump_tex_mipfilter(unsigned value, boolean shortened); + +const char * +debug_dump_tex_filter(unsigned value, boolean shortened); + /* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */ -- cgit v1.2.3