#include "pipe/p_context.h"
#include "pipe/p_state.h"
-#include "pipe/p_util.h"
#include "nv40_context.h"
#include "nv40_state.h"
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;
}
ve = &nv40->vtxelt[hw];
vb = &nv40->vtxbuf[ve->vertex_buffer_index];
- if (!vb->pitch) {
+ if (!vb->stride) {
if (!sattr)
sattr = so_new(16 * 5, 0);
so_reloc(vtxbuf, vb->buffer, vb->buffer_offset + ve->src_offset,
vb_flags | NOUVEAU_BO_LOW | NOUVEAU_BO_OR,
0, NV40TCL_VTXBUF_ADDRESS_DMA1);
- so_data (vtxfmt, ((vb->pitch << NV40TCL_VTXFMT_STRIDE_SHIFT) |
+ so_data (vtxfmt, ((vb->stride << NV40TCL_VTXFMT_STRIDE_SHIFT) |
(ncomp << NV40TCL_VTXFMT_SIZE_SHIFT) | type));
}