st/nine: Rework update_vertex_buffers
authorAxel Davy <axel.davy@ens.fr>
Fri, 20 Feb 2015 17:25:44 +0000 (18:25 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 29 Apr 2015 06:28:11 +0000 (08:28 +0200)
commit4acbf420d1101bd32e8f23acadff5fe6c6fa9b26
treea4c08e08b1f121d0aa8bbd4b3a23147a161d77be
parent5beb411bf753da4c86082c505929bcc9629c666c
st/nine: Rework update_vertex_buffers

Previous code was trying to optimise to call set_vertex_buffers on
big packets, and thus avoids as many calls as possible.

However in practice doing so won't be faster (drivers implement
set_vertex_buffers by a loop over the buffers we want to bind)

When we want to unbind a buffer, we were calling set_vertex_buffers
on a buffer with vtxbuf->buffer = NULL. It works on some drivers,
but not on all of them, because it isn't in Gallium spec.
This patch fixes that.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_state.c