Lines Matching refs:pool
38 struct v3dv_query_pool *pool =
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->query_count, 16);
64 pool->bo = v3dv_bo_alloc(device, bo_size, "query", true);
65 if (!pool->bo) {
69 if (!v3dv_bo_map(device, pool->bo, bo_size)) {
76 for (i = 0; i < pool->query_count; i++) {
77 pool->queries[i].maybe_available = false;
78 switch (pool->query_type) {
82 pool->queries[i].bo = pool->bo;
83 pool->queries[i].offset = query_offset;
87 pool->queries[i].value = 0;
94 *pQueryPool = v3dv_query_pool_to_handle(pool);
99 if (pool->bo)
100 v3dv_bo_free(device, pool->bo);
101 if (pool->queries)
102 vk_free2(&device->vk.alloc, pAllocator, pool->queries);
103 vk_object_free(&device->vk, pAllocator, pool);
114 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
116 if (!pool)
119 if (pool->bo)
120 v3dv_bo_free(device, pool->bo);
122 if (pool->queries)
123 vk_free2(&device->vk.alloc, pAllocator, pool->queries);
125 vk_object_free(&device->vk, pAllocator, pool);
142 struct v3dv_query_pool *pool,
148 assert(pool && pool->query_type == VK_QUERY_TYPE_OCCLUSION);
150 struct v3dv_query *q = &pool->queries[query];
179 struct v3dv_query_pool *pool,
185 assert(pool && pool->query_type == VK_QUERY_TYPE_TIMESTAMP);
187 struct v3dv_query *q = &pool->queries[query];
211 struct v3dv_query_pool *pool,
217 switch (pool->query_type) {
219 return get_occlusion_query_result(device, pool, query, do_wait,
222 return get_timestamp_query_result(device, pool, query, do_wait,
231 struct v3dv_query_pool *pool,
238 assert(first < pool->query_count);
239 assert(first + count <= pool->query_count);
251 get_query_result(device, pool, i, do_wait, &available, &value);
295 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
297 return v3dv_get_query_pool_results_cpu(device, pool, firstQuery, queryCount,
308 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
310 v3dv_cmd_buffer_reset_queries(cmd_buffer, pool, firstQuery, queryCount);
324 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
327 v3dv_cmd_buffer_copy_query_results(cmd_buffer, pool,
339 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
341 v3dv_cmd_buffer_begin_query(cmd_buffer, pool, query, flags);
350 V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
352 v3dv_cmd_buffer_end_query(cmd_buffer, pool, query);