Lines Matching full:pool
38 struct v3dv_query_pool *pool = in v3dv_CreateQueryPool() local
39 vk_object_zalloc(&device->vk, pAllocator, sizeof(*pool), in v3dv_CreateQueryPool()
41 if (pool == NULL) in v3dv_CreateQueryPool()
44 pool->query_type = pCreateInfo->queryType; in v3dv_CreateQueryPool()
45 pool->query_count = pCreateInfo->queryCount; in v3dv_CreateQueryPool()
49 const uint32_t pool_bytes = sizeof(struct v3dv_query) * pool->query_count; in v3dv_CreateQueryPool()
50 pool->queries = vk_alloc2(&device->vk.alloc, pAllocator, pool_bytes, 8, in v3dv_CreateQueryPool()
52 if (pool->queries == NULL) { in v3dv_CreateQueryPool()
57 if (pool->query_type == VK_QUERY_TYPE_OCCLUSION) { in v3dv_CreateQueryPool()
62 const uint32_t query_groups = DIV_ROUND_UP(pool->query_count, 16); in v3dv_CreateQueryPool()
64 pool->bo = v3dv_bo_alloc(device, bo_size, "query", true); in v3dv_CreateQueryPool()
65 if (!pool->bo) { in v3dv_CreateQueryPool()
69 if (!v3dv_bo_map(device, pool->bo, bo_size)) { in v3dv_CreateQueryPool()
76 for (i = 0; i < pool->query_count; i++) { in v3dv_CreateQueryPool()
77 pool->queries[i].maybe_available = false; in v3dv_CreateQueryPool()
78 switch (pool->query_type) { in v3dv_CreateQueryPool()
82 pool->queries[i].bo = pool->bo; in v3dv_CreateQueryPool()
83 pool->queries[i].offset = query_offset; in v3dv_CreateQueryPool()
87 pool->queries[i].value = 0; in v3dv_CreateQueryPool()
94 *pQueryPool = v3dv_query_pool_to_handle(pool); in v3dv_CreateQueryPool()
99 if (pool->bo) in v3dv_CreateQueryPool()
100 v3dv_bo_free(device, pool->bo); in v3dv_CreateQueryPool()
101 if (pool->queries) in v3dv_CreateQueryPool()
102 vk_free2(&device->vk.alloc, pAllocator, pool->queries); in v3dv_CreateQueryPool()
103 vk_object_free(&device->vk, pAllocator, pool); in v3dv_CreateQueryPool()
114 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool); in v3dv_DestroyQueryPool()
116 if (!pool) in v3dv_DestroyQueryPool()
119 if (pool->bo) in v3dv_DestroyQueryPool()
120 v3dv_bo_free(device, pool->bo); in v3dv_DestroyQueryPool()
122 if (pool->queries) in v3dv_DestroyQueryPool()
123 vk_free2(&device->vk.alloc, pAllocator, pool->queries); in v3dv_DestroyQueryPool()
125 vk_object_free(&device->vk, pAllocator, pool); in v3dv_DestroyQueryPool()
142 struct v3dv_query_pool *pool, in get_occlusion_query_result() argument
148 assert(pool && pool->query_type == VK_QUERY_TYPE_OCCLUSION); in get_occlusion_query_result()
150 struct v3dv_query *q = &pool->queries[query]; in get_occlusion_query_result()
179 struct v3dv_query_pool *pool, in get_timestamp_query_result() argument
185 assert(pool && pool->query_type == VK_QUERY_TYPE_TIMESTAMP); in get_timestamp_query_result()
187 struct v3dv_query *q = &pool->queries[query]; in get_timestamp_query_result()
211 struct v3dv_query_pool *pool, in get_query_result() argument
217 switch (pool->query_type) { in get_query_result()
219 return get_occlusion_query_result(device, pool, query, do_wait, in get_query_result()
222 return get_timestamp_query_result(device, pool, query, do_wait, in get_query_result()
231 struct v3dv_query_pool *pool, in v3dv_get_query_pool_results_cpu() argument
238 assert(first < pool->query_count); in v3dv_get_query_pool_results_cpu()
239 assert(first + count <= pool->query_count); in v3dv_get_query_pool_results_cpu()
251 get_query_result(device, pool, i, do_wait, &available, &value); in v3dv_get_query_pool_results_cpu()
295 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool); in v3dv_GetQueryPoolResults()
297 return v3dv_get_query_pool_results_cpu(device, pool, firstQuery, queryCount, in v3dv_GetQueryPoolResults()
308 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool); in v3dv_CmdResetQueryPool()
310 v3dv_cmd_buffer_reset_queries(cmd_buffer, pool, firstQuery, queryCount); in v3dv_CmdResetQueryPool()
324 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool); in v3dv_CmdCopyQueryPoolResults()
327 v3dv_cmd_buffer_copy_query_results(cmd_buffer, pool, in v3dv_CmdCopyQueryPoolResults()
339 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool); in v3dv_CmdBeginQuery()
341 v3dv_cmd_buffer_begin_query(cmd_buffer, pool, query, flags); in v3dv_CmdBeginQuery()
350 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool); in v3dv_CmdEndQuery()
352 v3dv_cmd_buffer_end_query(cmd_buffer, pool, query); in v3dv_CmdEndQuery()