summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_vertex.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-21 11:16:22 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-21 11:16:22 -0700
commit382b86e90f69fa0493fae3c7e5c9cd482984af8f (patch)
tree6fc58cd23789615754c828eb509be395ed76a045 /src/mesa/pipe/draw/draw_vertex.h
parentf4b89be70111793a6b5eb511e1c92be72bb6b3d9 (diff)
gallium: add a src_index[] array to draw's vertex_info for mapping post-xform vertex attribs to hw vertex attribs
Diffstat (limited to 'src/mesa/pipe/draw/draw_vertex.h')
-rw-r--r--src/mesa/pipe/draw/draw_vertex.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex.h b/src/mesa/pipe/draw/draw_vertex.h
index 8bb328affa..ab0425e106 100644
--- a/src/mesa/pipe/draw/draw_vertex.h
+++ b/src/mesa/pipe/draw/draw_vertex.h
@@ -70,6 +70,7 @@ struct vertex_info
uint hwfmt[4]; /**< hardware format info for this format */
enum interp_mode interp_mode[PIPE_MAX_SHADER_OUTPUTS];
enum attrib_format format[PIPE_MAX_SHADER_OUTPUTS]; /**< FORMAT_x */
+ uint src_index[PIPE_MAX_SHADER_OUTPUTS];
uint size; /**< total vertex size in dwords */
};
@@ -77,16 +78,20 @@ struct vertex_info
/**
* Add another attribute to the given vertex_info object.
+ * \param src_index indicates which post-transformed vertex attrib slot
+ * corresponds to this attribute.
* \return slot in which the attribute was added
*/
static INLINE uint
draw_emit_vertex_attr(struct vertex_info *vinfo,
- enum attrib_format format, enum interp_mode interp)
+ enum attrib_format format, enum interp_mode interp,
+ uint src_index)
{
const uint n = vinfo->num_attribs;
assert(n < PIPE_MAX_SHADER_OUTPUTS);
vinfo->format[n] = format;
vinfo->interp_mode[n] = interp;
+ vinfo->src_index[n] = src_index;
vinfo->num_attribs++;
return n;
}