mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 23:40:10 +01:00
pb: Fix the build, and add notes.
This commit is contained in:
parent
853953dc3c
commit
67763488b1
5 changed files with 14 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ pb_debug_buffer_fill(struct pb_debug_buffer *buf)
|
|||
{
|
||||
uint8_t *map;
|
||||
|
||||
map = pb_map(buf->buffer, PB_USAGE_CPU_WRITE);
|
||||
map = pb_map(buf->buffer, PB_USAGE_CPU_WRITE, NULL);
|
||||
assert(map);
|
||||
if(map) {
|
||||
fill_random_pattern(map, buf->underflow_size);
|
||||
|
|
|
|||
|
|
@ -108,11 +108,14 @@ mm_buffer_destroy(struct pb_buffer *buf)
|
|||
|
||||
static void *
|
||||
mm_buffer_map(struct pb_buffer *buf,
|
||||
unsigned flags)
|
||||
unsigned flags,
|
||||
void *flush_ctx)
|
||||
{
|
||||
struct mm_buffer *mm_buf = mm_buffer(buf);
|
||||
struct mm_pb_manager *mm = mm_buf->mgr;
|
||||
|
||||
/* XXX: it will be necessary to remap here to propagate flush_ctx */
|
||||
|
||||
return (unsigned char *) mm->map + mm_buf->block->ofs;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,12 +118,14 @@ pool_buffer_destroy(struct pb_buffer *buf)
|
|||
|
||||
|
||||
static void *
|
||||
pool_buffer_map(struct pb_buffer *buf, unsigned flags)
|
||||
pool_buffer_map(struct pb_buffer *buf, unsigned flags, void *flush_ctx)
|
||||
{
|
||||
struct pool_buffer *pool_buf = pool_buffer(buf);
|
||||
struct pool_pb_manager *pool = pool_buf->mgr;
|
||||
void *map;
|
||||
|
||||
/* XXX: it will be necessary to remap here to propagate flush_ctx */
|
||||
|
||||
pipe_mutex_lock(pool->mutex);
|
||||
map = (unsigned char *) pool->map + pool_buf->start;
|
||||
pipe_mutex_unlock(pool->mutex);
|
||||
|
|
|
|||
|
|
@ -227,10 +227,13 @@ pb_slab_buffer_destroy(struct pb_buffer *_buf)
|
|||
|
||||
static void *
|
||||
pb_slab_buffer_map(struct pb_buffer *_buf,
|
||||
unsigned flags)
|
||||
unsigned flags,
|
||||
void *flush_ctx)
|
||||
{
|
||||
struct pb_slab_buffer *buf = pb_slab_buffer(_buf);
|
||||
|
||||
/* XXX: it will be necessary to remap here to propagate flush_ctx */
|
||||
|
||||
++buf->mapCount;
|
||||
return (void *) ((uint8_t *) buf->slab->virtual + buf->start);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue