| /xsrc/external/mit/MesaLib.old/dist/src/gallium/state_trackers/nine/ |
| H A D | threadpool.c | 44 struct threadpool *pool = data; local in function:threadpool_worker 46 pthread_mutex_lock(&pool->m); 48 while (!pool->shutdown) { 52 while (!pool->workqueue && !pool->shutdown) 53 pthread_cond_wait(&pool->new_work, &pool->m); 55 if (pool->shutdown) 62 task = pool->workqueue; 63 pool 90 struct threadpool *pool = calloc(1, sizeof(*pool)); local in function:_mesa_threadpool_create 109 _mesa_threadpool_destroy(struct NineSwapChain9 * swapchain,struct threadpool * pool) argument 142 _mesa_threadpool_queue_task(struct threadpool * pool,threadpool_task_func work,void * data) argument 184 _mesa_threadpool_wait_for_task(struct threadpool * pool,struct threadpool_task ** task_handle) argument [all...] |
| H A D | nine_helpers.c | 26 nine_range_pool_more(struct nine_range_pool *pool) argument 30 assert(!pool->free); 32 if (pool->num_slabs == pool->num_slabs_max) { 33 unsigned p = pool->num_slabs_max; 34 unsigned n = pool->num_slabs_max * 2; 37 pool->slabs = REALLOC(pool->slabs, 40 pool->num_slabs_max = n; 42 pool 53 nine_range_pool_get(struct nine_range_pool * pool,int16_t bgn,int16_t end) argument 66 nine_ranges_coalesce(struct nine_range * r,struct nine_range_pool * pool) argument 79 nine_ranges_insert(struct nine_range ** head,int16_t bgn,int16_t end,struct nine_range_pool * pool) argument [all...] |
| /xsrc/external/mit/MesaLib/dist/src/gallium/frontends/nine/ |
| H A D | threadpool.c | 44 struct threadpool *pool = data; local in function:threadpool_worker 46 pthread_mutex_lock(&pool->m); 48 while (!pool->shutdown) { 52 while (!pool->workqueue && !pool->shutdown) 53 pthread_cond_wait(&pool->new_work, &pool->m); 55 if (pool->shutdown) 62 task = pool->workqueue; 63 pool 90 struct threadpool *pool = calloc(1, sizeof(*pool)); local in function:_mesa_threadpool_create 109 _mesa_threadpool_destroy(struct NineSwapChain9 * swapchain,struct threadpool * pool) argument 142 _mesa_threadpool_queue_task(struct threadpool * pool,threadpool_task_func work,void * data) argument 184 _mesa_threadpool_wait_for_task(struct threadpool * pool,struct threadpool_task ** task_handle) argument [all...] |
| H A D | nine_helpers.c | 26 nine_range_pool_more(struct nine_range_pool *pool) argument 30 assert(!pool->free); 32 if (pool->num_slabs == pool->num_slabs_max) { 33 unsigned p = pool->num_slabs_max; 34 unsigned n = pool->num_slabs_max * 2; 37 pool->slabs = REALLOC(pool->slabs, 40 pool->num_slabs_max = n; 42 pool 53 nine_range_pool_get(struct nine_range_pool * pool,int16_t bgn,int16_t end) argument 66 nine_ranges_coalesce(struct nine_range * r,struct nine_range_pool * pool) argument 79 nine_ranges_insert(struct nine_range ** head,int16_t bgn,int16_t end,struct nine_range_pool * pool) argument [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/r300/compiler/ |
| H A D | memory_pool.c | 38 void memory_pool_init(struct memory_pool * pool) argument 40 memset(pool, 0, sizeof(struct memory_pool)); 44 void memory_pool_destroy(struct memory_pool * pool) argument 46 while(pool->blocks) { 47 struct memory_block * block = pool->blocks; 48 pool->blocks = block->next; 53 static void refill_pool(struct memory_pool * pool) argument 55 unsigned int blocksize = pool->total_allocated; 62 newblock->next = pool->blocks; 63 pool 71 memory_pool_malloc(struct memory_pool * pool,unsigned int bytes) argument [all...] |
| H A D | memory_pool.h | 29 * Provides a pool of memory that can quickly be allocated from, at the 31 * Instead, the entire pool can be freed at once. 45 void memory_pool_init(struct memory_pool * pool); 46 void memory_pool_destroy(struct memory_pool * pool); 47 void * memory_pool_malloc(struct memory_pool * pool, unsigned int bytes); 58 * memory_pool_array_reserve(pool, type, Array, Size, Reserved, k); 66 #define memory_pool_array_reserve(pool, type, array, size, reserved, num) do { \ 73 newarray = memory_pool_malloc((pool), newreserve * sizeof(type)); \
|
| /xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r300/compiler/ |
| H A D | memory_pool.c | 38 void memory_pool_init(struct memory_pool * pool) argument 40 memset(pool, 0, sizeof(struct memory_pool)); 44 void memory_pool_destroy(struct memory_pool * pool) argument 46 while(pool->blocks) { 47 struct memory_block * block = pool->blocks; 48 pool->blocks = block->next; 53 static void refill_pool(struct memory_pool * pool) argument 55 unsigned int blocksize = pool->total_allocated; 62 newblock->next = pool->blocks; 63 pool 71 memory_pool_malloc(struct memory_pool * pool,unsigned int bytes) argument [all...] |
| H A D | memory_pool.h | 29 * Provides a pool of memory that can quickly be allocated from, at the 31 * Instead, the entire pool can be freed at once. 45 void memory_pool_init(struct memory_pool * pool); 46 void memory_pool_destroy(struct memory_pool * pool); 47 void * memory_pool_malloc(struct memory_pool * pool, unsigned int bytes); 58 * memory_pool_array_reserve(pool, type, Array, Size, Reserved, k); 66 #define memory_pool_array_reserve(pool, type, array, size, reserved, num) do { \ 73 newarray = memory_pool_malloc((pool), newreserve * sizeof(type)); \
|
| /xsrc/external/mit/MesaLib/dist/src/gallium/drivers/panfrost/ |
| H A D | pan_mempool.h | 37 /* BOs allocated by this pool */ 46 /* Mode of the pool. BO management is in the pool for owned mode, but 52 to_panfrost_pool(struct pan_pool *pool) argument 54 return container_of(pool, struct panfrost_pool, base); 57 /* Reference to pool allocated memory for an unowned pool */ 67 /* Take a reference to an allocation pool. Call directly after allocating from 68 * an unowned pool for correct operation. */ 71 panfrost_pool_take_ref(struct panfrost_pool *pool, mali_pt argument 92 panfrost_pool_num_bos(struct panfrost_pool * pool) argument [all...] |
| H A D | pan_mempool.c | 32 * In "owned" mode, a single parent owns the entire pool, and the pool owns all 34 * panfrost_pool_get_bo_handles. Freeing occurs at the level of an entire pool. 35 * This is useful for streaming uploads, where the batch owns the pool. 37 * In "unowned" mode, the pool is freestanding. It does not track created BOs 44 panfrost_pool_alloc_backing(struct panfrost_pool *pool, size_t bo_sz) argument 52 struct panfrost_bo *bo = panfrost_bo_create(pool->base.dev, bo_sz, 53 pool->base.create_flags, pool->base.label); 55 if (pool 67 panfrost_pool_init(struct panfrost_pool * pool,void * memctx,struct panfrost_device * dev,unsigned create_flags,size_t slab_size,const char * label,bool prealloc,bool owned) argument 84 panfrost_pool_cleanup(struct panfrost_pool * pool) argument 98 panfrost_pool_get_bo_handles(struct panfrost_pool * pool,uint32_t * handles) argument 119 panfrost_pool_alloc_aligned(struct panfrost_pool * pool,size_t sz,unsigned alignment) argument [all...] |
| /xsrc/external/mit/MesaLib/dist/src/gallium/drivers/llvmpipe/ |
| H A D | lp_cs_tpool.c | 27 * compute shader thread pool. 38 struct lp_cs_tpool *pool = data; local in function:lp_cs_tpool_worker 42 mtx_lock(&pool->m); 44 while (!pool->shutdown) { 48 while (list_is_empty(&pool->workqueue) && !pool->shutdown) 49 cnd_wait(&pool->new_work, &pool->m); 51 if (pool->shutdown) 54 task = list_first_entry(&pool 89 struct lp_cs_tpool *pool = CALLOC_STRUCT(lp_cs_tpool); local in function:lp_cs_tpool_create 106 lp_cs_tpool_destroy(struct lp_cs_tpool * pool) argument 126 lp_cs_tpool_queue_task(struct lp_cs_tpool * pool,lp_cs_tpool_task_func work,void * data,int num_iters) argument 165 lp_cs_tpool_wait_for_task(struct lp_cs_tpool * pool,struct lp_cs_tpool_task ** task_handle) argument [all...] |
| /xsrc/external/mit/MesaLib/dist/src/panfrost/vulkan/ |
| H A D | panvk_mempool.c | 32 * In "owned" mode, a single parent owns the entire pool, and the pool owns all 34 * panvk_pool_get_bo_handles. Freeing occurs at the level of an entire pool. 35 * This is useful for streaming uploads, where the batch owns the pool. 37 * In "unowned" mode, the pool is freestanding. It does not track created BOs 44 panvk_pool_alloc_backing(struct panvk_pool *pool, size_t bo_sz) argument 48 /* If there's a free BO in our BO pool, let's pick it. */ 49 if (pool->bo_pool && bo_sz == pool->base.slab_size && 50 util_dynarray_num_elements(&pool 75 panvk_pool_alloc_aligned(struct panvk_pool * pool,size_t sz,unsigned alignment) argument 120 panvk_pool_reset(struct panvk_pool * pool) argument 142 panvk_pool_cleanup(struct panvk_pool * pool) argument 150 panvk_pool_get_bo_handles(struct panvk_pool * pool,uint32_t * handles) argument [all...] |
| H A D | panvk_mempool.h | 53 /* Before allocating a new BO, check if the BO pool has free BOs. 58 /* BOs allocated by this pool */ 70 to_panvk_pool(struct pan_pool *pool) argument 72 return container_of(pool, struct panvk_pool, base); 76 panvk_pool_init(struct panvk_pool *pool, struct panfrost_device *dev, 81 panvk_pool_reset(struct panvk_pool *pool); 84 panvk_pool_cleanup(struct panvk_pool *pool); 87 panvk_pool_num_bos(struct panvk_pool *pool) argument 89 return util_dynarray_num_elements(&pool->bos, struct panfrost_bo *); 93 panvk_pool_get_bo_handles(struct panvk_pool *pool, uint32_ [all...] |
| /xsrc/external/mit/MesaLib/dist/src/asahi/lib/ |
| H A D | pool.c | 28 #include "pool.h" 32 * into the pool and copy there */ 37 agx_pool_alloc_backing(struct agx_pool *pool, size_t bo_sz) argument 39 struct agx_bo *bo = agx_bo_create(pool->dev, bo_sz, 40 pool->create_flags); 42 util_dynarray_append(&pool->bos, struct agx_bo *, bo); 43 pool->transient_bo = bo; 44 pool->transient_offset = 0; 50 agx_pool_init(struct agx_pool *pool, struct agx_device *dev, argument 53 memset(pool, 63 agx_pool_cleanup(struct agx_pool * pool) argument 73 agx_pool_get_bo_handles(struct agx_pool * pool,uint32_t * handles) argument 82 agx_pool_alloc_aligned(struct agx_pool * pool,size_t sz,unsigned alignment) argument 109 agx_pool_upload(struct agx_pool * pool,const void * data,size_t sz) argument 115 agx_pool_upload_aligned(struct agx_pool * pool,const void * data,size_t sz,unsigned alignment) argument [all...] |
| H A D | pool.h | 34 /* Represents a pool of memory that can only grow, used to allocate objects 35 * with the same lifetime as the pool itself. In OpenGL, a pool is owned by the 37 * command pool */ 43 /* BOs allocated by this pool */ 52 /* BO flags to use in the pool */ 57 agx_pool_init(struct agx_pool *pool, struct agx_device *dev, 61 agx_pool_cleanup(struct agx_pool *pool); 64 agx_pool_num_bos(struct agx_pool *pool) argument 66 return util_dynarray_num_elements(&pool 106 agx_pool_alloc_descs(struct agx_pool * pool,const struct agx_desc_alloc_info * descs) argument [all...] |
| /xsrc/external/mit/MesaLib/dist/src/gallium/drivers/iris/ |
| H A D | iris_border_color.c | 36 * To work around this, we maintain a single "border color pool" BO 40 * wasting a lot of space in the pool. 66 iris_reset_border_color_pool(struct iris_border_color_pool *pool, argument 69 _mesa_hash_table_clear(pool->ht, NULL); 71 iris_bo_unreference(pool->bo); 73 pool->bo = iris_bo_alloc(bufmgr, "border colors", 76 pool->map = iris_bo_map(NULL, pool->bo, MAP_WRITE); 79 pool->insert_point = BC_ALIGNMENT; 88 struct iris_border_color_pool *pool local in function:iris_init_border_color_pool 99 struct iris_border_color_pool *pool = &ice->state.border_color_pool; local in function:iris_destroy_border_color_pool 111 struct iris_border_color_pool *pool = &ice->state.border_color_pool; local in function:iris_border_color_pool_reserve 136 struct iris_border_color_pool *pool = &ice->state.border_color_pool; local in function:iris_upload_border_color [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/iris/ |
| H A D | iris_border_color.c | 36 * To work around this, we maintain a single "border color pool" BO 40 * wasting a lot of space in the pool. 66 iris_reset_border_color_pool(struct iris_border_color_pool *pool, argument 69 _mesa_hash_table_clear(pool->ht, NULL); 71 iris_bo_unreference(pool->bo); 73 pool->bo = iris_bo_alloc(bufmgr, "border colors", 76 pool->map = iris_bo_map(NULL, pool->bo, MAP_WRITE); 79 pool->insert_point = BC_ALIGNMENT; 88 struct iris_border_color_pool *pool local in function:iris_init_border_color_pool 99 struct iris_border_color_pool *pool = &ice->state.border_color_pool; local in function:iris_destroy_border_color_pool 111 struct iris_border_color_pool *pool = &ice->state.border_color_pool; local in function:iris_border_color_pool_reserve 136 struct iris_border_color_pool *pool = &ice->state.border_color_pool; local in function:iris_upload_border_color [all...] |
| /xsrc/external/mit/MesaLib/dist/src/util/ |
| H A D | slab.c | 48 * - a pointer to the child pool to which this element belongs, or 62 /* Next page in the same child pool. */ 83 * pool has been destroyed). Mark the element as freed and free the whole page 99 * Create a parent pool for the allocation of same-sized objects. 122 * Create a child pool linked to the given parent. 124 void slab_create_child(struct slab_child_pool *pool, argument 127 pool->parent = parent; 128 pool->pages = NULL; 129 pool->free = NULL; 130 pool 139 slab_destroy_child(struct slab_child_pool * pool) argument 176 slab_add_new_page(struct slab_child_pool * pool) argument 206 slab_alloc(struct slab_child_pool * pool) argument 242 slab_free(struct slab_child_pool * pool,void * ptr) argument [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/util/ |
| H A D | slab.c | 48 * - a pointer to the child pool to which this element belongs, or 62 /* Next page in the same child pool. */ 83 * pool has been destroyed). Mark the element as freed and free the whole page 99 * Create a parent pool for the allocation of same-sized objects. 122 * Create a child pool linked to the given parent. 124 void slab_create_child(struct slab_child_pool *pool, argument 127 pool->parent = parent; 128 pool->pages = NULL; 129 pool->free = NULL; 130 pool 139 slab_destroy_child(struct slab_child_pool * pool) argument 176 slab_add_new_page(struct slab_child_pool * pool) argument 206 slab_alloc(struct slab_child_pool * pool) argument 242 slab_free(struct slab_child_pool * pool,void * ptr) argument [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/intel/vulkan/tests/ |
| H A D | block_pool_grow_first.c | 34 struct anv_block_pool pool; local in function:main 36 /* Create a pool with initial size smaller than the block allocated, so 42 anv_block_pool_init(&pool, &device, 4096, initial_size, EXEC_OBJECT_PINNED); 43 assert(pool.size == initial_size); 46 int32_t offset = anv_block_pool_alloc(&pool, block_size, &padding); 49 assert(pool.size > initial_size); 50 assert(pool.size >= initial_size + block_size); 59 void *map = anv_block_pool_map(&pool, offset); 62 anv_block_pool_finish(&pool);
|
| /xsrc/external/mit/MesaLib/dist/src/intel/vulkan/tests/ |
| H A D | block_pool_grow_first.c | 35 struct anv_block_pool pool; local in function:main 37 /* Create a pool with initial size smaller than the block allocated, so 45 anv_block_pool_init(&pool, &device, "test", 4096, initial_size); 46 ASSERT(pool.size == initial_size); 49 int32_t offset = anv_block_pool_alloc(&pool, block_size, &padding); 52 ASSERT(pool.size > initial_size); 53 ASSERT(pool.size >= initial_size + block_size); 62 void *map = anv_block_pool_map(&pool, offset, block_size); 65 anv_block_pool_finish(&pool);
|
| /xsrc/external/mit/MesaLib/dist/src/broadcom/vulkan/ |
| H A D | v3dv_query.c | 38 struct v3dv_query_pool *pool = local in function:v3dv_CreateQueryPool 39 vk_object_zalloc(&device->vk, pAllocator, sizeof(*pool), 41 if (pool == NULL) 44 pool->query_type = pCreateInfo->queryType; 45 pool->query_count = pCreateInfo->queryCount; 49 const uint32_t pool_bytes = sizeof(struct v3dv_query) * pool->query_count; 50 pool->queries = vk_alloc2(&device->vk.alloc, pAllocator, pool_bytes, 8, 52 if (pool->queries == NULL) { 57 if (pool->query_type == VK_QUERY_TYPE_OCCLUSION) { 62 const uint32_t query_groups = DIV_ROUND_UP(pool 141 get_occlusion_query_result(struct v3dv_device * device,struct v3dv_query_pool * pool,uint32_t query,bool do_wait,bool * available,uint64_t * value) argument 178 get_timestamp_query_result(struct v3dv_device * device,struct v3dv_query_pool * pool,uint32_t query,bool do_wait,bool * available,uint64_t * value) argument 210 get_query_result(struct v3dv_device * device,struct v3dv_query_pool * pool,uint32_t query,bool do_wait,bool * available,uint64_t * value) argument 230 v3dv_get_query_pool_results_cpu(struct v3dv_device * device,struct v3dv_query_pool * pool,uint32_t first,uint32_t count,void * data,VkDeviceSize stride,VkQueryResultFlags flags) argument [all...] |
| /xsrc/external/mit/MesaLib/dist/src/panfrost/lib/ |
| H A D | pan_pool.h | 43 /* BO flags to use in the pool */ 51 pan_pool_init(struct pan_pool *pool, struct panfrost_device *dev, argument 54 pool->dev = dev; 55 pool->create_flags = create_flags; 56 pool->slab_size = slab_size; 57 pool->label = label; 64 pan_pool_alloc_aligned(struct pan_pool *pool, size_t sz, unsigned alignment); 70 pool_subclass *pool = container_of(p, pool_subclass, base); \ 71 return alloc_func(pool, sz, alignment); \ 75 pan_pool_upload_aligned(struct pan_pool *pool, cons argument 83 pan_pool_upload(struct pan_pool * pool,const void * data,size_t sz) argument 110 pan_pool_alloc_descs(struct pan_pool * pool,const struct pan_desc_alloc_info * descs) argument [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/r600/ |
| H A D | compute_memory_pool.c | 48 static void compute_memory_shadow(struct compute_memory_pool* pool, 51 static void compute_memory_defrag(struct compute_memory_pool *pool, 55 static int compute_memory_promote_item(struct compute_memory_pool *pool, 59 static void compute_memory_move_item(struct compute_memory_pool *pool, 64 static void compute_memory_transfer(struct compute_memory_pool* pool, 70 * Creates a new pool. 75 struct compute_memory_pool* pool = (struct compute_memory_pool*) local in function:compute_memory_pool_new 77 if (!pool) 82 pool->screen = rscreen; 83 pool 98 compute_memory_pool_init(struct compute_memory_pool * pool,unsigned initial_size_in_dw) argument 113 compute_memory_pool_delete(struct compute_memory_pool * pool) argument 132 compute_memory_grow_defrag_pool(struct compute_memory_pool * pool,struct pipe_context * pipe,int new_size_in_dw) argument 194 compute_memory_shadow(struct compute_memory_pool * pool,struct pipe_context * pipe,int device_to_host) argument 215 compute_memory_finalize_pending(struct compute_memory_pool * pool,struct pipe_context * pipe) argument 288 compute_memory_defrag(struct compute_memory_pool * pool,struct pipe_resource * src,struct pipe_resource * dst,struct pipe_context * pipe) argument 318 compute_memory_promote_item(struct compute_memory_pool * pool,struct compute_memory_item * item,struct pipe_context * pipe,int64_t start_in_dw) argument 367 compute_memory_demote_item(struct compute_memory_pool * pool,struct compute_memory_item * item,struct pipe_context * pipe) argument 423 compute_memory_move_item(struct compute_memory_pool * pool,struct pipe_resource * src,struct pipe_resource * dst,struct compute_memory_item * item,uint64_t new_start_in_dw,struct pipe_context * pipe) argument 502 compute_memory_free(struct compute_memory_pool * pool,int64_t id) argument 562 compute_memory_alloc(struct compute_memory_pool * pool,int64_t size_in_dw) argument 595 compute_memory_transfer(struct compute_memory_pool * pool,struct pipe_context * pipe,int device_to_host,struct compute_memory_item * chunk,void * data,int offset_in_chunk,int size) argument [all...] |
| /xsrc/external/mit/MesaLib/dist/src/gallium/drivers/r600/ |
| H A D | compute_memory_pool.c | 48 static void compute_memory_shadow(struct compute_memory_pool* pool, 51 static void compute_memory_defrag(struct compute_memory_pool *pool, 55 static int compute_memory_promote_item(struct compute_memory_pool *pool, 59 static void compute_memory_move_item(struct compute_memory_pool *pool, 64 static void compute_memory_transfer(struct compute_memory_pool* pool, 70 * Creates a new pool. 75 struct compute_memory_pool* pool = (struct compute_memory_pool*) local in function:compute_memory_pool_new 77 if (!pool) 82 pool->screen = rscreen; 83 pool 98 compute_memory_pool_init(struct compute_memory_pool * pool,unsigned initial_size_in_dw) argument 113 compute_memory_pool_delete(struct compute_memory_pool * pool) argument 132 compute_memory_grow_defrag_pool(struct compute_memory_pool * pool,struct pipe_context * pipe,int new_size_in_dw) argument 194 compute_memory_shadow(struct compute_memory_pool * pool,struct pipe_context * pipe,int device_to_host) argument 215 compute_memory_finalize_pending(struct compute_memory_pool * pool,struct pipe_context * pipe) argument 288 compute_memory_defrag(struct compute_memory_pool * pool,struct pipe_resource * src,struct pipe_resource * dst,struct pipe_context * pipe) argument 318 compute_memory_promote_item(struct compute_memory_pool * pool,struct compute_memory_item * item,struct pipe_context * pipe,int64_t start_in_dw) argument 367 compute_memory_demote_item(struct compute_memory_pool * pool,struct compute_memory_item * item,struct pipe_context * pipe) argument 423 compute_memory_move_item(struct compute_memory_pool * pool,struct pipe_resource * src,struct pipe_resource * dst,struct compute_memory_item * item,uint64_t new_start_in_dw,struct pipe_context * pipe) argument 501 compute_memory_free(struct compute_memory_pool * pool,int64_t id) argument 561 compute_memory_alloc(struct compute_memory_pool * pool,int64_t size_in_dw) argument 594 compute_memory_transfer(struct compute_memory_pool * pool,struct pipe_context * pipe,int device_to_host,struct compute_memory_item * chunk,void * data,int offset_in_chunk,int size) argument [all...] |