From: Andreas Hartmetz <andreas.hartm...@kdab.com> It is possible that there are multiple input buffers but only one is relevant for translation. Then there will be only a single translation group, which might need to source data from a buffer index != 0.
Fixes wrong vertex shader inputs as observed while debugging with an application and driver combination that requires translation of a vertex attribute in a non-trivial set of attributes and input buffers. --- src/gallium/auxiliary/translate/translate_sse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index 8dd30c4..dace722 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -1235,8 +1235,10 @@ static boolean incr_inputs(struct translate_sse *p, unsigned index_size) { if (!index_size && p->nr_groups == 1) { + const unsigned buffer_index = p->group[0].buffer_index; struct x86_reg stride = - x86_make_disp(p->machine_EDI, get_offset(p, &p->buffer[0].stride)); + x86_make_disp(p->machine_EDI, + get_offset(p, &p->buffer[buffer_index].stride)); if (p->group[0].instance_divisor == 0) { x64_rexw(p->func); -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev