Go to the source code of this file.
Data Structures | |
struct | pb_user_buffer |
User buffers are special buffers that initially reference memory held by the user but which may if necessary copy that memory into device memory behind the scenes, for submission to hardware. More... | |
Functions | |
static struct pb_user_buffer * | pb_user_buffer (struct pb_buffer *buf) |
static void | pb_user_buffer_destroy (struct pb_buffer *buf) |
static void * | pb_user_buffer_map (struct pb_buffer *buf, unsigned flags) |
static void | pb_user_buffer_unmap (struct pb_buffer *buf) |
static void | pb_user_buffer_get_base_buffer (struct pb_buffer *buf, struct pb_buffer **base_buf, unsigned *offset) |
static struct pipe_buffer * | pb_winsys_user_buffer_create (struct pipe_winsys *winsys, void *data, unsigned bytes) |
static void * | pb_winsys_buffer_map (struct pipe_winsys *winsys, struct pipe_buffer *buf, unsigned flags) |
static void | pb_winsys_buffer_unmap (struct pipe_winsys *winsys, struct pipe_buffer *buf) |
static void | pb_winsys_buffer_destroy (struct pipe_winsys *winsys, struct pipe_buffer *buf) |
void | pb_init_winsys (struct pipe_winsys *winsys) |
Variables | |
struct pb_vtbl | pb_user_buffer_vtbl |
Definition in file pb_winsys.c.
void pb_init_winsys | ( | struct pipe_winsys * | winsys | ) |
Definition at line 164 of file pb_winsys.c.
References pipe_winsys::buffer_destroy, pipe_winsys::buffer_map, pipe_winsys::buffer_unmap, pb_winsys_buffer_destroy(), pb_winsys_buffer_map(), pb_winsys_buffer_unmap(), pb_winsys_user_buffer_create(), and pipe_winsys::user_buffer_create.
00165 { 00166 winsys->user_buffer_create = pb_winsys_user_buffer_create; 00167 winsys->buffer_map = pb_winsys_buffer_map; 00168 winsys->buffer_unmap = pb_winsys_buffer_unmap; 00169 winsys->buffer_destroy = pb_winsys_buffer_destroy; 00170 }
static struct pb_user_buffer* pb_user_buffer | ( | struct pb_buffer * | buf | ) | [static, read] |
Definition at line 63 of file pb_winsys.c.
References assert, pb_user_buffer_vtbl, and pb_buffer::vtbl.
00064 { 00065 assert(buf); 00066 assert(buf->vtbl == &pb_user_buffer_vtbl); 00067 return (struct pb_user_buffer *)buf; 00068 }
static void pb_user_buffer_destroy | ( | struct pb_buffer * | buf | ) | [static] |
static void pb_user_buffer_get_base_buffer | ( | struct pb_buffer * | buf, | |
struct pb_buffer ** | base_buf, | |||
unsigned * | offset | |||
) | [static] |
Definition at line 95 of file pb_winsys.c.
00098 { 00099 *base_buf = buf; 00100 *offset = 0; 00101 }
static void* pb_user_buffer_map | ( | struct pb_buffer * | buf, | |
unsigned | flags | |||
) | [static] |
Definition at line 80 of file pb_winsys.c.
References pb_user_buffer::data, and pb_user_buffer().
00082 { 00083 return pb_user_buffer(buf)->data; 00084 }
static void pb_user_buffer_unmap | ( | struct pb_buffer * | buf | ) | [static] |
static void pb_winsys_buffer_destroy | ( | struct pipe_winsys * | winsys, | |
struct pipe_buffer * | buf | |||
) | [static] |
Definition at line 155 of file pb_winsys.c.
References pb_buffer(), and pb_destroy().
00157 { 00158 (void)winsys; 00159 pb_destroy(pb_buffer(buf)); 00160 }
static void* pb_winsys_buffer_map | ( | struct pipe_winsys * | winsys, | |
struct pipe_buffer * | buf, | |||
unsigned | flags | |||
) | [static] |
static void pb_winsys_buffer_unmap | ( | struct pipe_winsys * | winsys, | |
struct pipe_buffer * | buf | |||
) | [static] |
static struct pipe_buffer* pb_winsys_user_buffer_create | ( | struct pipe_winsys * | winsys, | |
void * | data, | |||
unsigned | bytes | |||
) | [static, read] |
Definition at line 114 of file pb_winsys.c.
References pipe_buffer::alignment, pb_buffer::base, pb_user_buffer::base, CALLOC_STRUCT, pb_user_buffer::data, pipe_buffer::refcount, pipe_buffer::size, pipe_buffer::usage, and pb_buffer::vtbl.
00117 { 00118 struct pb_user_buffer *buf = CALLOC_STRUCT(pb_user_buffer); 00119 00120 if(!buf) 00121 return NULL; 00122 00123 buf->base.base.refcount = 1; 00124 buf->base.base.size = bytes; 00125 buf->base.base.alignment = 0; 00126 buf->base.base.usage = 0; 00127 00128 buf->base.vtbl = &pb_user_buffer_vtbl; 00129 buf->data = data; 00130 00131 return &buf->base.base; 00132 }
struct pb_vtbl pb_user_buffer_vtbl [read] |
Initial value:
{ pb_user_buffer_destroy, pb_user_buffer_map, pb_user_buffer_unmap, pb_user_buffer_get_base_buffer }
Definition at line 105 of file pb_winsys.c.