st/nine: Upload managed buffers only at draw using them
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>
This commit is contained in:
parent
5df96995ef
commit
bb3b8f8e01
|
@ -125,8 +125,11 @@ NineBindBufferToDevice( struct NineDevice9 *device,
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue