diff options
author | Luca Barbieri <[email protected]> | 2010-02-23 08:50:15 -0800 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-02-23 19:50:24 +0000 |
commit | 9f4f87893b4d3555204a1a66d108f8f9185e3d14 (patch) | |
tree | d818c52627cb4426510c8ad1be6bbee09d89fdd0 /src/gallium/auxiliary | |
parent | c41cf31da8e2b57ea9911ed1720650cfc2649a84 (diff) |
pipebuffer: avoid assert due to increasing a zeroed refcnt
The cache manager stores buffers with a reference count that dropped to 0.
pipe_reference asserts in this case on debug builds,
so use pipe_reference_init instead.
Signed-off-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c index 53bc019a204..86f9266c95f 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c @@ -294,7 +294,7 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr, LIST_DEL(&buf->head); pipe_mutex_unlock(mgr->mutex); /* Increase refcount */ - pipe_reference(NULL, &buf->base.base.reference); + pipe_reference_init(&buf->base.base.reference, 1); return &buf->base; } |