nouveau: pf_sprint_name -> pf_name
authorBen Skeggs <skeggsb@gmail.com>
Mon, 11 Aug 2008 06:14:42 +0000 (16:14 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Mon, 11 Aug 2008 06:14:42 +0000 (16:14 +1000)
src/gallium/drivers/nv04/nv04_fragtex.c
src/gallium/drivers/nv30/nv30_fragtex.c
src/gallium/drivers/nv30/nv30_vbo.c
src/gallium/drivers/nv40/nv40_fragtex.c
src/gallium/drivers/nv40/nv40_vbo.c
src/gallium/drivers/nv50/nv50_state_validate.c
src/gallium/drivers/nv50/nv50_vbo.c

index 3db673cd2c1afe246875dadfc3e6deb957f5595d..1b866aae1991d4f84e6260bb945cdf6f5e05e748 100644 (file)
@@ -51,7 +51,6 @@ static uint32_t
 nv04_fragtex_format(uint pipe_format)
 {
        struct nv04_texture_format *tf = nv04_texture_formats;
-       char fs[128];
        int i;
 
        for (i=0; i< sizeof(nv04_texture_formats)/sizeof(nv04_texture_formats[0]); i++) {
@@ -60,8 +59,7 @@ nv04_fragtex_format(uint pipe_format)
                tf++;
        }
 
-       pf_sprint_name(fs, pipe_format);
-       NOUVEAU_ERR("unknown texture format %s\n", fs);
+       NOUVEAU_ERR("unknown texture format %s\n", pf_name(pipe_format));
        return 0;
 }
 
index 4242f86f76ffcb40c184b4524c2845661c7cfe01..91246f5ca0ab1f0d15cf793238120f590bd59a23 100644 (file)
@@ -75,8 +75,7 @@ nv30_fragtex_format(uint pipe_format)
                tf++;
        }
 
-       pf_sprint_name(fs, pipe_format);
-       NOUVEAU_ERR("unknown texture format %s\n", fs);
+       NOUVEAU_ERR("unknown texture format %s\n", pf_name(pipe_format));
        return NULL;
 }
 
index d930557f6bbe4da8443bc5441a3b4899b1f59a89..b1c73793bf2e8c73a6d037b7c8e1cc454599c0ca 100644 (file)
@@ -14,8 +14,6 @@
 static INLINE int
 nv30_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
 {
-       char fs[128];
-
        switch (pipe) {
        case PIPE_FORMAT_R32_FLOAT:
        case PIPE_FORMAT_R32G32_FLOAT:
@@ -36,8 +34,7 @@ nv30_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
                *fmt = NV34TCL_VTXFMT_TYPE_USHORT;
                break;
        default:
-               pf_sprint_name(fs, pipe);
-               NOUVEAU_ERR("Unknown format %s\n", fs);
+               NOUVEAU_ERR("Unknown format %s\n", pf_name(pipe));
                return 1;
        }
 
@@ -63,8 +60,7 @@ nv30_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
                *ncomp = 4;
                break;
        default:
-               pf_sprint_name(fs, pipe);
-               NOUVEAU_ERR("Unknown format %s\n", fs);
+               NOUVEAU_ERR("Unknown format %s\n", pf_name(pipe));
                return 1;
        }
 
index 2d45c2545cda30191abcd746aa727e196bd693cc..566d5a8d5ba300470080a24312cddd73c3ccc22d 100644 (file)
@@ -45,7 +45,6 @@ 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)
@@ -53,8 +52,7 @@ nv40_fragtex_format(uint pipe_format)
                tf++;
        }
 
-       pf_sprint_name(fs, pipe_format);
-       NOUVEAU_ERR("unknown texture format %s\n", fs);
+       NOUVEAU_ERR("unknown texture format %s\n", pf_name(pipe_format));
        return NULL;
 }
 
index 93669e6192fd3da4ff27c7fbca24b67c559675c0..755d5586b7be40965e925e064d9b02bdec922c9b 100644 (file)
@@ -14,8 +14,6 @@
 static INLINE int
 nv40_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
 {
-       char fs[128];
-
        switch (pipe) {
        case PIPE_FORMAT_R32_FLOAT:
        case PIPE_FORMAT_R32G32_FLOAT:
@@ -36,8 +34,7 @@ nv40_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
                *fmt = NV40TCL_VTXFMT_TYPE_USHORT;
                break;
        default:
-               pf_sprint_name(fs, pipe);
-               NOUVEAU_ERR("Unknown format %s\n", fs);
+               NOUVEAU_ERR("Unknown format %s\n", pf_name(pipe));
                return 1;
        }
 
@@ -63,8 +60,7 @@ nv40_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
                *ncomp = 4;
                break;
        default:
-               pf_sprint_name(fs, pipe);
-               NOUVEAU_ERR("Unknown format %s\n", fs);
+               NOUVEAU_ERR("Unknown format %s\n", pf_name(pipe));
                return 1;
        }
 
index 8f9ee05acc868a550e8a2610d6da7322bb8932c6..198e25f4482ea929fa480bf3a7f2392e8ff733c2 100644 (file)
@@ -58,11 +58,8 @@ nv50_state_validate_fb(struct nv50_context *nv50)
                        so_data(so, 0xe8);
                        break;
                default:
-                       {
-                               char fmt[128];
-                               pf_sprint_name(fmt, fb->cbufs[i]->format);
-                               NOUVEAU_ERR("AIIII unknown format %s\n", fmt);
-                       }                   
+                       NOUVEAU_ERR("AIIII unknown format %s\n",
+                                   pf_name(fb->cbufs[i]->format));
                        so_data(so, 0xe6);
                        break;
                }
@@ -96,11 +93,8 @@ nv50_state_validate_fb(struct nv50_context *nv50)
                        so_data(so, 0x15);
                        break;
                default:
-                       {
-                               char fmt[128];
-                               pf_sprint_name(fmt, fb->zsbuf->format);
-                               NOUVEAU_ERR("AIIII unknown format %s\n", fmt);
-                       }                   
+                       NOUVEAU_ERR("AIIII unknown format %s\n",
+                                   pf_name(fb->zsbuf->format));
                        so_data(so, 0x16);
                        break;
                }
index 8e420ad172eca8a1f06be9c780c90ab68db829d1..c94531723bcbbc0b8fb273c40e173299ea37c8aa 100644 (file)
@@ -215,9 +215,8 @@ nv50_vbo_validate(struct nv50_context *nv50)
                        break;
                default:
                {
-                       char fmt[128];
-                       pf_sprint_name(fmt, ve->src_format);
-                       NOUVEAU_ERR("invalid vbo format %s\n", fmt);
+                       NOUVEAU_ERR("invalid vbo format %s\n",
+                                   pf_name(ve->src_format));
                        assert(0);
                        return;
                }