nv40: dump meaningful names for surface formats
authorBen Skeggs <darktama@beleth.(none)>
Mon, 25 Feb 2008 01:26:48 +0000 (12:26 +1100)
committerBen Skeggs <darktama@beleth.(none)>
Mon, 25 Feb 2008 01:26:48 +0000 (12:26 +1100)
src/gallium/drivers/nv40/nv40_fragtex.c
src/gallium/drivers/nv40/nv40_vbo.c

index c8a8120f305884cdf5d3041269a66fcafe3e4d4e..7adee8858d01804257790fa5d62cc379a2133511 100644 (file)
@@ -41,6 +41,7 @@ static struct nv40_texture_format *
 nv40_fragtex_format(uint pipe_format)
 {
        struct nv40_texture_format *tf = nv40_texture_formats;
+       char fs[128];
 
        while (tf->defined) {
                if (tf->pipe == pipe_format)
@@ -48,6 +49,8 @@ nv40_fragtex_format(uint pipe_format)
                tf++;
        }
 
+       pf_sprint_name(fs, pipe_format);
+       NOUVEAU_ERR("unknown texture format %s\n", fs);
        return NULL;
 }
 
index 5abe4c9af101e106f9fbb63dea5870f04d611fa9..753c2fe64b9e4ec60c0663677bc4daf4c24bf58c 100644 (file)
@@ -30,9 +30,13 @@ nv40_vbo_type(uint format)
        case PIPE_FORMAT_TYPE_UNORM:
                return NV40TCL_VTXFMT_TYPE_UBYTE;
        default:
-               NOUVEAU_ERR("Unknown format 0x%08x\n", format);
+       {
+               char fs[128];
+               pf_sprint_name(fs, format);
+               NOUVEAU_ERR("Unknown format %s\n", fs);
                return NV40TCL_VTXFMT_TYPE_FLOAT;
        }
+       }
 }
 
 static boolean