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++) {
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;
}
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;
}
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:
*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;
}
*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;
}
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)
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;
}
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:
*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;
}
*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;
}
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;
}
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;
}
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;
}