X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fpipebuffer%2Fpb_buffer_malloc.c;h=b106a1a02799f8d4282d32734c216ffa35655117;hb=84fce45321166e55c03c95ece29d4c27de6740a6;hp=6bdce5fcb060b355ec8115686c809fb77019641e;hpb=e87320b5e033a911d4ced2d516e479cdf1bc9228;p=mesa.git diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c index 6bdce5fcb06..b106a1a0279 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c @@ -70,7 +70,8 @@ malloc_buffer_destroy(struct pb_buffer *buf) static void * malloc_buffer_map(struct pb_buffer *buf, - unsigned flags) + unsigned flags, + void *flush_ctx) { return malloc_buffer(buf)->data; } @@ -134,10 +135,10 @@ pb_malloc_buffer_create(pb_size size, if(!buf) return NULL; - pipe_reference_init(&buf->base.base.reference, 1); - buf->base.base.alignment = desc->alignment; - buf->base.base.usage = desc->usage; - buf->base.base.size = size; + pipe_reference_init(&buf->base.reference, 1); + buf->base.usage = desc->usage; + buf->base.size = size; + buf->base.alignment = desc->alignment; buf->base.vtbl = &malloc_buffer_vtbl; buf->data = align_malloc(size, desc->alignment < sizeof(void*) ? sizeof(void*) : desc->alignment); @@ -173,11 +174,20 @@ pb_malloc_bufmgr_destroy(struct pb_manager *mgr) } +static boolean +pb_malloc_bufmgr_is_buffer_busy( struct pb_manager *mgr, + struct pb_buffer *buf ) +{ + return FALSE; +} + + static struct pb_manager pb_malloc_bufmgr = { pb_malloc_bufmgr_destroy, pb_malloc_bufmgr_create_buffer, - pb_malloc_bufmgr_flush + pb_malloc_bufmgr_flush, + pb_malloc_bufmgr_is_buffer_busy };