i915: Use _mesa_get_format_name to describe translate_tex_format() fail.
authorEric Anholt <eric@anholt.net>
Mon, 11 Jul 2011 18:34:56 +0000 (11:34 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 12 Jul 2011 21:40:43 +0000 (14:40 -0700)
I don't want to go count up to what format number 29 is.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i915/i830_texstate.c
src/mesa/drivers/dri/i915/i915_texstate.c

index d4af5e51026bda429cc5f48f8a5ad73ac85cef76..71ce44fd5c90e78a65b2b7479fdb8dbe5a2a04d1 100644 (file)
@@ -76,7 +76,8 @@ translate_texture_format(GLuint mesa_format)
    case MESA_FORMAT_RGBA_DXT5:
       return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
    default:
-      fprintf(stderr, "%s: bad image format %x\n", __FUNCTION__, mesa_format);
+      fprintf(stderr, "%s: bad image format %s\n", __FUNCTION__,
+             _mesa_get_format_name(mesa_format));
       abort();
       return 0;
    }
index bcf42d59969f96ad98f7805e3f7e5d7251308741..90ebee3846dd506b4550887aaf2d503f109d9f65 100644 (file)
@@ -89,7 +89,8 @@ translate_texture_format(gl_format mesa_format, GLenum DepthMode)
       else
         return (MAPSURF_32BIT | MT_32BIT_x8L24);
    default:
-      fprintf(stderr, "%s: bad image format %x\n", __FUNCTION__, mesa_format);
+      fprintf(stderr, "%s: bad image format %s\n", __FUNCTION__,
+             _mesa_get_format_name(mesa_format));
       abort();
       return 0;
    }