summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/nine/buffer9.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/buffer9.h b/src/gallium/state_trackers/nine/buffer9.h
index 1803d8d6405..9ccd6dab990 100644
--- a/src/gallium/state_trackers/nine/buffer9.h
+++ b/src/gallium/state_trackers/nine/buffer9.h
@@ -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);
}