diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-04-29 20:33:37 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-04-29 20:48:14 +0100 |
commit | 9bfe1a3d505733489f7583fe603b7d192f38fa8c (patch) | |
tree | c665fb36b4b1597cdb0085fb9dfde6d5217183f0 /src/gallium/auxiliary/util/u_pack_color.h | |
parent | 733bc4df1a53bb1899933685e06c52109d096bee (diff) |
gallium: add debug_print_format() make it easier to print format error messages
Diffstat (limited to 'src/gallium/auxiliary/util/u_pack_color.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_pack_color.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h index 8296f1291c..7e26b1642a 100644 --- a/src/gallium/auxiliary/util/u_pack_color.h +++ b/src/gallium/auxiliary/util/u_pack_color.h @@ -91,7 +91,8 @@ util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a, return; /* XXX lots more cases to add */ default: - debug_printf("gallium: unhandled format in util_pack_color_ub()\n"); + debug_print_format("gallium: unhandled format in util_pack_color_ub()", format); + assert(0); } } @@ -174,7 +175,8 @@ util_pack_color(const float rgba[4], enum pipe_format format, void *dest) return; /* XXX lots more cases to add */ default: - debug_printf("gallium: unhandled format in util_pack_color()\n"); + debug_print_format("gallium: unhandled format in util_pack_color()", format); + assert(0); } } @@ -201,7 +203,8 @@ util_pack_z(enum pipe_format format, double z) case PIPE_FORMAT_Z24X8_UNORM: return ((uint) (z * 0xffffff)) << 8; default: - debug_printf("gallium: unhandled format in util_pack_z()\n"); + debug_print_format("gallium: unhandled format in util_pack_z()", format); + assert(0); return 0; } } |