summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw/draw_vertex.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-09-20 13:42:37 -0600
committerBrian <[email protected]>2007-09-20 13:43:23 -0600
commit086734502a614e7778533018846ee66a66df9821 (patch)
tree80fc84b09af1915693bb6cf2c8596fb61a6cb1b4 /src/mesa/pipe/draw/draw_vertex.c
parent745f0cbe0528ac925096f5c1b85de7280fee7fbc (diff)
Checkpoint: vertex attribute clean-up.
Remove/disable the attrib/slot mapping arrays in a few places. Work in progress...
Diffstat (limited to 'src/mesa/pipe/draw/draw_vertex.c')
-rw-r--r--src/mesa/pipe/draw/draw_vertex.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex.c b/src/mesa/pipe/draw/draw_vertex.c
index 1c7e1d8662b..ab4e6c78641 100644
--- a/src/mesa/pipe/draw/draw_vertex.c
+++ b/src/mesa/pipe/draw/draw_vertex.c
@@ -45,17 +45,10 @@
static INLINE void
-emit_vertex_attr(struct vertex_info *vinfo, uint vfAttr,
+emit_vertex_attr(struct vertex_info *vinfo, /*uint vfAttr,*/
attrib_format format, interp_mode interp)
{
const uint n = vinfo->num_attribs;
- vinfo->attr_mask |= (1 << vfAttr);
- vinfo->slot_to_attrib[n] = vfAttr;
- if (n >= 2) {
- /* the first two slots are the vertex header & clippos */
- assert(vfAttr < Elements(vinfo->attrib_to_slot));
- vinfo->attrib_to_slot[vfAttr] = n - 2;
- }
vinfo->interp_mode[n] = interp;
vinfo->format[n] = format;
vinfo->num_attribs++;
@@ -110,22 +103,24 @@ draw_set_vertex_attributes( struct draw_context *draw,
struct vertex_info *vinfo = &draw->vertex_info;
unsigned i;
+#if 0
assert(slot_to_vf_attr[0] == TGSI_ATTRIB_POS);
+#endif
memset(vinfo, 0, sizeof(*vinfo));
/*
* First three attribs are always the same: header, clip pos, winpos
*/
- emit_vertex_attr(vinfo, TGSI_ATTRIB_VERTEX_HEADER, FORMAT_1F, INTERP_NONE);
- emit_vertex_attr(vinfo, TGSI_ATTRIB_CLIP_POS, FORMAT_4F, INTERP_LINEAR);
- emit_vertex_attr(vinfo, TGSI_ATTRIB_POS, FORMAT_4F_VIEWPORT, INTERP_LINEAR);
+ emit_vertex_attr(vinfo, /*TGSI_ATTRIB_VERTEX_HEADER,*/ FORMAT_1F, INTERP_NONE);
+ emit_vertex_attr(vinfo, /*TGSI_ATTRIB_CLIP_POS,*/ FORMAT_4F, INTERP_LINEAR);
+ emit_vertex_attr(vinfo, /*TGSI_ATTRIB_POS,*/ FORMAT_4F_VIEWPORT, INTERP_LINEAR);
/*
* Remaining attribs (color, texcoords, etc)
*/
for (i = 1; i < nr_attrs; i++) {
- emit_vertex_attr(vinfo, slot_to_vf_attr[i], FORMAT_4F, interps[i]);
+ emit_vertex_attr(vinfo, /*slot_to_vf_attr[i],*/ FORMAT_4F, interps[i]);
}
draw_compute_vertex_size(vinfo);