From d8b16d416de95daa4f0ede9b839bdbf0fa6bf1b1 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 23 Aug 2007 17:00:47 -0600 Subject: Checkpoint: new vertex/fragment attribute naming Replace VF_ATTRIB_x with TGSI_ATTRIB_x When converting mesa programs to TGSI programs, also convert the InputsRead and OutputsWritten to a mask of TGSI_ATTRIB_ bits. Still need to do conversion for vertex programs... --- src/mesa/pipe/draw/draw_arrays.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe/draw/draw_arrays.c') diff --git a/src/mesa/pipe/draw/draw_arrays.c b/src/mesa/pipe/draw/draw_arrays.c index 784eb3f2e6..f6bf174dc0 100644 --- a/src/mesa/pipe/draw/draw_arrays.c +++ b/src/mesa/pipe/draw/draw_arrays.c @@ -78,6 +78,7 @@ emit_vertex_attr(struct vertex_info *vinfo, uint vfAttr, uint format) 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; } /*printf("Vertex slot %d = vfattrib %d\n", n, vfAttr);*/ @@ -128,16 +129,16 @@ draw_set_vertex_attributes( struct draw_context *draw, struct vertex_info *vinfo = &draw->vertex_info; unsigned i; - assert(slot_to_vf_attr[0] == VF_ATTRIB_POS); + assert(slot_to_vf_attr[0] == TGSI_ATTRIB_POS); memset(vinfo, 0, sizeof(*vinfo)); /* * First three attribs are always the same: header, clip pos, winpos */ - emit_vertex_attr(vinfo, VF_ATTRIB_VERTEX_HEADER, FORMAT_1F); - emit_vertex_attr(vinfo, VF_ATTRIB_CLIP_POS, FORMAT_4F); - emit_vertex_attr(vinfo, VF_ATTRIB_POS, FORMAT_4F_VIEWPORT); + emit_vertex_attr(vinfo, TGSI_ATTRIB_VERTEX_HEADER, FORMAT_1F); + emit_vertex_attr(vinfo, TGSI_ATTRIB_CLIP_POS, FORMAT_4F); + emit_vertex_attr(vinfo, TGSI_ATTRIB_POS, FORMAT_4F_VIEWPORT); /* * Remaining attribs (color, texcoords, etc) -- cgit v1.2.3