diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vertex.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vertex.h b/src/gallium/auxiliary/draw/draw_vertex.h index 9e10ada1a59..2e726e0c36d 100644 --- a/src/gallium/auxiliary/draw/draw_vertex.h +++ b/src/gallium/auxiliary/draw/draw_vertex.h @@ -128,6 +128,13 @@ draw_emit_vertex_attr(struct vertex_info *vinfo, int src_index) { const uint n = vinfo->num_attribs; + + /* If the src_index is negative, meaning it hasn't been found + * lets just redirect it to the first output slot */ + if (src_index < 0) { + src_index = 0; + } + assert(n < Elements(vinfo->attrib)); vinfo->attrib[n].emit = emit; vinfo->attrib[n].interp_mode = interp; |