summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_vertex.h
diff options
context:
space:
mode:
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;
}