summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-03-13 15:47:18 +0100
committerThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-03-16 11:40:47 +0100
commitcf25ef9072f5290d228a381727c4ff921b0c60d6 (patch)
tree6e8be9bcf952d395920d742ac3468896c52ffed8 /src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
parentfc1ef97c3349588cd33a22dc88ab30b6f701000e (diff)
gallium: Use struct pipe_atomic for pipe refcounts.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 37ed64b84f6..478682dbee9 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -208,7 +208,7 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf)
{
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
- assert(!buf->base.base.reference.count);
+ assert(p_atomic_read(&buf->base.base.reference.count) == 0);
pb_debug_buffer_check(buf);
@@ -315,7 +315,7 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
return NULL;
}
- assert(buf->buffer->base.reference.count >= 1);
+ assert(p_atomic_read(&buf->buffer->base.reference.count) >= 1);
assert(pb_check_alignment(real_desc.alignment, buf->buffer->base.alignment));
assert(pb_check_usage(real_desc.usage, buf->buffer->base.usage));
assert(buf->buffer->base.size >= real_size);