st/nine: Upload managed textures only at draw using them
When a draw call is emited, textures in the device->update_textures list are uploaded. This patch removes textures from the list if they are not bound anymore. Signed-off-by: Axel Davy <davyaxel0@gmail.com>
This commit is contained in:
parent
394420ebb3
commit
5df96995ef
|
@ -144,8 +144,11 @@ NineBindTextureToDevice( struct NineDevice9 *device,
|
|||
|
||||
tex->bind_count++;
|
||||
}
|
||||
if (old)
|
||||
if (old) {
|
||||
old->bind_count--;
|
||||
if (!old->bind_count)
|
||||
list_delinit(&old->list);
|
||||
}
|
||||
|
||||
nine_bind(slot, tex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue