nv50,nvc0: fix push hint logic in presence of a start offset
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 11 Oct 2017 03:50:06 +0000 (23:50 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 11 Oct 2017 12:18:16 +0000 (08:18 -0400)
commitb20bccbcacc6170cfc4f18332491131df5bac811
tree377ead2916f27ac1fb673ef1534e1163de3c5089
parent735711ab86078732a6ce63cc1292e9814c01fb25
nv50,nvc0: fix push hint logic in presence of a start offset

Previously buffer offsets were passed in explicitly as an offset, which
had to be added to the resource address. Now they are passed in via an
increased 'start' parameter. As a result, we were double-adding the
start offset in this kind of situation.

This condition was triggered by piglit's draw-elements test which has a
requisite glMultiDrawElements in combination with a small enough number
of vertices to go through the immediate push path.

Fixes: 330d0607ed6 ("gallium: remove pipe_index_buffer and set_index_buffer")
Reported-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/nv50/nv50_push.c
src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c