summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/buffer9.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/buffer9.h')
-rw-r--r--src/gallium/state_trackers/nine/buffer9.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/buffer9.h b/src/gallium/state_trackers/nine/buffer9.h
index 0dd2fc64c0e..49b67a9eaf9 100644
--- a/src/gallium/state_trackers/nine/buffer9.h
+++ b/src/gallium/state_trackers/nine/buffer9.h
@@ -104,9 +104,11 @@ NineBindBufferToDevice( struct NineDevice9 *device,
{
struct NineBuffer9 *old = *slot;
- (void)device;
- if (buf)
+ if (buf) {
+ if ((buf->managed.dirty) && LIST_IS_EMPTY(&buf->managed.list))
+ list_add(&buf->managed.list, &device->update_buffers);
buf->bind_count++;
+ }
if (old)
old->bind_count--;
@@ -116,4 +118,10 @@ NineBindBufferToDevice( struct NineDevice9 *device,
void
NineBuffer9_SetDirty( struct NineBuffer9 *This );
+#define BASEBUF_REGISTER_UPDATE(b) { \
+ if ((b)->managed.dirty && (b)->bind_count) \
+ if (LIST_IS_EMPTY(&(b)->managed.list)) \
+ list_add(&(b)->managed.list, &(b)->base.base.device->update_buffers); \
+ }
+
#endif /* _NINE_BUFFER9_H_ */