summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index 17ff61b675..e4adf8aad7 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -115,7 +115,7 @@ _fenced_buffer_add(struct fenced_buffer *fenced_buf)
{
struct fenced_buffer_list *fenced_list = fenced_buf->list;
- assert(fenced_buf->base.base.refcount);
+ assert(fenced_buf->base.base.reference.count);
assert(fenced_buf->flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE);
assert(fenced_buf->fence);
@@ -137,7 +137,7 @@ _fenced_buffer_destroy(struct fenced_buffer *fenced_buf)
{
struct fenced_buffer_list *fenced_list = fenced_buf->list;
- assert(!fenced_buf->base.base.refcount);
+ assert(!fenced_buf->base.base.reference.count);
assert(!fenced_buf->fence);
#ifdef DEBUG
assert(fenced_buf->head.prev);
@@ -177,7 +177,7 @@ _fenced_buffer_remove(struct fenced_buffer_list *fenced_list,
++fenced_list->numUnfenced;
#endif
- if(!fenced_buf->base.base.refcount)
+ if(!fenced_buf->base.base.reference.count)
_fenced_buffer_destroy(fenced_buf);
}
@@ -253,7 +253,7 @@ fenced_buffer_destroy(struct pb_buffer *buf)
struct fenced_buffer_list *fenced_list = fenced_buf->list;
pipe_mutex_lock(fenced_list->mutex);
- assert(fenced_buf->base.base.refcount == 0);
+ assert(fenced_buf->base.base.reference.count == 0);
if (fenced_buf->fence) {
struct pb_fence_ops *ops = fenced_list->ops;
if(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0) {
@@ -461,7 +461,7 @@ fenced_buffer_create(struct fenced_buffer_list *fenced_list,
return NULL;
}
- buf->base.base.refcount = 1;
+ pipe_reference_init(&buf->base.base.reference, 1);
buf->base.base.alignment = buffer->base.alignment;
buf->base.base.usage = buffer->base.usage;
buf->base.base.size = buffer->base.size;
@@ -527,7 +527,7 @@ fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list)
pipe_mutex_lock(fenced_list->mutex);
debug_printf("%10s %7s %10s %s\n",
- "buffer", "refcount", "fence", "signalled");
+ "buffer", "reference.count", "fence", "signalled");
curr = fenced_list->unfenced.next;
next = curr->next;
@@ -536,7 +536,7 @@ fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list)
assert(!fenced_buf->fence);
debug_printf("%10p %7u\n",
fenced_buf,
- fenced_buf->base.base.refcount);
+ fenced_buf->base.base.reference.count);
curr = next;
next = curr->next;
}
@@ -549,7 +549,7 @@ fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list)
signaled = ops->fence_signalled(ops, fenced_buf->fence, 0);
debug_printf("%10p %7u %10p %s\n",
fenced_buf,
- fenced_buf->base.base.refcount,
+ fenced_buf->base.base.reference.count,
fenced_buf->fence,
signaled == 0 ? "y" : "n");
curr = next;