• Home
  • Raw
  • Download

Lines Matching full:pool

43    struct anv_query_pool *pool;  in genX()  local
48 /* Query pool slots are made up of some number of 64-bit values packed in genX()
79 pool = vk_alloc2(&device->alloc, pAllocator, sizeof(*pool), 8, in genX()
81 if (pool == NULL) in genX()
84 pool->type = pCreateInfo->queryType; in genX()
85 pool->pipeline_statistics = pipeline_statistics; in genX()
86 pool->stride = uint64s_per_slot * sizeof(uint64_t); in genX()
87 pool->slots = pCreateInfo->queryCount; in genX()
89 uint64_t size = pool->slots * pool->stride; in genX()
90 result = anv_bo_init_new(&pool->bo, device, size); in genX()
95 pool->bo.flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS; in genX()
98 pool->bo.flags |= EXEC_OBJECT_ASYNC; in genX()
106 anv_gem_set_caching(device, pool->bo.gem_handle, I915_CACHING_CACHED); in genX()
108 pool->bo.map = anv_gem_mmap(device, pool->bo.gem_handle, 0, size, 0); in genX()
110 *pQueryPool = anv_query_pool_to_handle(pool); in genX()
115 vk_free2(&device->alloc, pAllocator, pool); in genX()
126 ANV_FROM_HANDLE(anv_query_pool, pool, _pool); in genX()
128 if (!pool) in genX()
131 anv_gem_munmap(pool->bo.map, pool->bo.size); in genX()
132 anv_gem_close(device, pool->bo.gem_handle); in genX()
133 vk_free2(&device->alloc, pAllocator, pool); in genX()
157 struct anv_query_pool *pool, uint64_t *slot) in wait_for_available() argument
163 int ret = anv_gem_busy(device, pool->bo.gem_handle); in wait_for_available()
206 ANV_FROM_HANDLE(anv_query_pool, pool, queryPool); in genX()
208 assert(pool->type == VK_QUERY_TYPE_OCCLUSION || in genX()
209 pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS || in genX()
210 pool->type == VK_QUERY_TYPE_TIMESTAMP); in genX()
222 uint64_t *slot = pool->bo.map + (firstQuery + i) * pool->stride; in genX()
228 status = wait_for_available(device, pool, slot); in genX()
247 switch (pool->type) { in genX()
254 uint32_t statistics = pool->pipeline_statistics; in genX()
269 assert(idx == _mesa_bitcount(pool->pipeline_statistics)); in genX()
278 unreachable("invalid pool type"); in genX()
285 uint32_t idx = (pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS) ? in genX()
286 _mesa_bitcount(pool->pipeline_statistics) : 1; in genX()
326 * Goes through a series of consecutive query indices in the given pool
331 struct anv_query_pool *pool, in emit_zero_queries() argument
334 const uint32_t num_elements = pool->stride / sizeof(uint64_t); in emit_zero_queries()
337 uint32_t slot_offset = (first_index + i) * pool->stride; in emit_zero_queries()
340 sdi.Address.bo = &pool->bo; in emit_zero_queries()
345 emit_query_availability(cmd_buffer, &pool->bo, slot_offset); in emit_zero_queries()
356 ANV_FROM_HANDLE(anv_query_pool, pool, queryPool); in genX()
361 .bo = &pool->bo, in genX()
362 .offset = (firstQuery + i) * pool->stride, in genX()
410 ANV_FROM_HANDLE(anv_query_pool, pool, queryPool); in genX()
412 switch (pool->type) { in genX()
414 emit_ps_depth_count(cmd_buffer, &pool->bo, query * pool->stride + 8); in genX()
424 uint32_t statistics = pool->pipeline_statistics; in genX()
425 uint32_t offset = query * pool->stride + 8; in genX()
428 emit_pipeline_stat(cmd_buffer, stat, &pool->bo, offset); in genX()
445 ANV_FROM_HANDLE(anv_query_pool, pool, queryPool); in genX()
447 switch (pool->type) { in genX()
449 emit_ps_depth_count(cmd_buffer, &pool->bo, query * pool->stride + 16); in genX()
450 emit_query_availability(cmd_buffer, &pool->bo, query * pool->stride); in genX()
460 uint32_t statistics = pool->pipeline_statistics; in genX()
461 uint32_t offset = query * pool->stride + 16; in genX()
464 emit_pipeline_stat(cmd_buffer, stat, &pool->bo, offset); in genX()
468 emit_query_availability(cmd_buffer, &pool->bo, query * pool->stride); in genX()
488 emit_zero_queries(cmd_buffer, pool, query + 1, num_queries - 1); in genX()
501 ANV_FROM_HANDLE(anv_query_pool, pool, queryPool); in genX()
502 uint32_t offset = query * pool->stride; in genX()
504 assert(pool->type == VK_QUERY_TYPE_TIMESTAMP); in genX()
510 srm.MemoryAddress = (struct anv_address) { &pool->bo, offset + 8 }; in genX()
514 srm.MemoryAddress = (struct anv_address) { &pool->bo, offset + 12 }; in genX()
523 pc.Address = (struct anv_address) { &pool->bo, offset + 8 }; in genX()
531 emit_query_availability(cmd_buffer, &pool->bo, offset); in genX()
545 emit_zero_queries(cmd_buffer, pool, query + 1, num_queries - 1); in genX()
738 ANV_FROM_HANDLE(anv_query_pool, pool, queryPool); in genX()
750 slot_offset = (firstQuery + i) * pool->stride; in genX()
751 switch (pool->type) { in genX()
754 &pool->bo, slot_offset + 8); in genX()
760 uint32_t statistics = pool->pipeline_statistics; in genX()
766 &pool->bo, slot_offset + idx * 16 + 8); in genX()
780 assert(idx == _mesa_bitcount(pool->pipeline_statistics)); in genX()
786 CS_GPR(2), &pool->bo, slot_offset + 8); in genX()
796 uint32_t idx = (pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS) ? in genX()
797 _mesa_bitcount(pool->pipeline_statistics) : 1; in genX()
800 &pool->bo, slot_offset); in genX()