When a draw call is emited, buffers in the
device->update_buffers list are uploaded.
This patch removes buffers from the list if they
are not bound anymore.
Behaviour found studying:
https://github.com/iXit/Mesa-3D/issues/345
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
list_add(&buf->managed.list, &device->update_buffers);
buf->bind_count++;
}
- if (old)
+ if (old) {
old->bind_count--;
+ if (!old->bind_count && old->managed.dirty)
+ list_delinit(&old->managed.list);
+ }
nine_bind(slot, buf);
}