aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2019-04-04 23:01:08 +0200
committerAxel Davy <[email protected]>2019-04-30 19:18:50 +0200
commit5df96995efc37260b2675f61804c94a1a632609f (patch)
tree4a725e0985860ac2b953866b6ce4a791dd435ae8
parent394420ebb3eec6d8956588ee13380d5059e14bea (diff)
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 <[email protected]>
-rw-r--r--src/gallium/state_trackers/nine/basetexture9.h5
1 files changed, 4 insertions, 1 deletions
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);
}