From 5df96995efc37260b2675f61804c94a1a632609f Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Thu, 4 Apr 2019 23:01:08 +0200 Subject: 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 --- src/gallium/state_trackers/nine/basetexture9.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/basetexture9.h b/src/gallium/state_trackers/nine/basetexture9.h index 19899c65825..7c6f66907b3 100644 --- a/src/gallium/state_trackers/nine/basetexture9.h +++ b/src/gallium/state_trackers/nine/basetexture9.h @@ -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); } -- cgit v1.2.3