Lines Matching refs:rscreen
57 static void r600_query_sw_destroy(struct r600_common_screen *rscreen, in r600_query_sw_destroy() argument
62 rscreen->b.fence_reference(&rscreen->b, &query->fence, NULL); in r600_query_sw_destroy()
482 void r600_query_hw_destroy(struct r600_common_screen *rscreen, in r600_query_hw_destroy() argument
500 static struct r600_resource *r600_new_query_buffer(struct r600_common_screen *rscreen, in r600_new_query_buffer() argument
504 rscreen->info.min_alloc_size); in r600_new_query_buffer()
511 pipe_buffer_create(&rscreen->b, 0, in r600_new_query_buffer()
516 if (!query->ops->prepare_buffer(rscreen, query, buf)) { in r600_new_query_buffer()
524 static bool r600_query_hw_prepare_buffer(struct r600_common_screen *rscreen, in r600_query_hw_prepare_buffer() argument
529 uint32_t *results = rscreen->ws->buffer_map(buffer->buf, NULL, in r600_query_hw_prepare_buffer()
539 unsigned max_rbs = rscreen->info.num_render_backends; in r600_query_hw_prepare_buffer()
540 unsigned enabled_rb_mask = rscreen->info.enabled_rb_mask; in r600_query_hw_prepare_buffer()
584 static void r600_query_hw_add_result(struct r600_common_screen *rscreen,
598 bool r600_query_hw_init(struct r600_common_screen *rscreen, in r600_query_hw_init() argument
601 query->buffer.buf = r600_new_query_buffer(rscreen, query); in r600_query_hw_init()
608 static struct pipe_query *r600_query_hw_create(struct r600_common_screen *rscreen, in r600_query_hw_create() argument
623 query->result_size = 16 * rscreen->info.num_render_backends; in r600_query_hw_create()
626 query->num_cs_dw_end = 6 + r600_gfx_write_fence_dwords(rscreen); in r600_query_hw_create()
631 query->num_cs_dw_end = 8 + r600_gfx_write_fence_dwords(rscreen); in r600_query_hw_create()
635 query->num_cs_dw_end = 8 + r600_gfx_write_fence_dwords(rscreen); in r600_query_hw_create()
656 query->result_size = (rscreen->chip_class >= EVERGREEN ? 11 : 8) * 16; in r600_query_hw_create()
659 query->num_cs_dw_end = 6 + r600_gfx_write_fence_dwords(rscreen); in r600_query_hw_create()
667 if (!r600_query_hw_init(rscreen, query)) { in r600_query_hw_create()
972 struct r600_common_screen *rscreen = in r600_create_query() local
980 return r600_query_hw_create(rscreen, query_type, index); in r600_create_query()
1163 static void r600_query_hw_add_result(struct r600_common_screen *rscreen, in r600_query_hw_add_result() argument
1168 unsigned max_rbs = rscreen->info.num_render_backends; in r600_query_hw_add_result()
1226 if (rscreen->chip_class >= EVERGREEN) { in r600_query_hw_add_result()
1324 struct r600_common_screen *rscreen = rctx->screen; in r600_query_hw_get_result() local
1345 query->ops->add_result(rscreen, query, map + results_base, in r600_query_hw_get_result()
1354 result->u64 = (1000000 * result->u64) / rscreen->info.clock_crystal_freq; in r600_query_hw_get_result()
1813 void r600_query_fix_enabled_rb_mask(struct r600_common_screen *rscreen) in r600_query_fix_enabled_rb_mask() argument
1816 (struct r600_common_context*)rscreen->aux_context; in r600_query_fix_enabled_rb_mask()
1835 assert(rscreen->chip_class <= CAYMAN); in r600_query_fix_enabled_rb_mask()
1844 if (rscreen->info.r600_gb_backend_map_valid && in r600_query_fix_enabled_rb_mask()
1845 (ctx->chip_class < EVERGREEN || rscreen->info.r600_gb_backend_map != 0)) { in r600_query_fix_enabled_rb_mask()
1846 unsigned num_tile_pipes = rscreen->info.num_tile_pipes; in r600_query_fix_enabled_rb_mask()
1847 unsigned backend_map = rscreen->info.r600_gb_backend_map; in r600_query_fix_enabled_rb_mask()
1864 rscreen->info.enabled_rb_mask = mask; in r600_query_fix_enabled_rb_mask()
1906 if (rscreen->debug_flags & DBG_INFO && in r600_query_fix_enabled_rb_mask()
1907 mask != rscreen->info.enabled_rb_mask) { in r600_query_fix_enabled_rb_mask()
1910 rscreen->info.enabled_rb_mask = mask; in r600_query_fix_enabled_rb_mask()
2013 static unsigned r600_get_num_queries(struct r600_common_screen *rscreen) in r600_get_num_queries() argument
2015 if (rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 42) in r600_get_num_queries()
2025 struct r600_common_screen *rscreen = (struct r600_common_screen*)screen; in r600_get_driver_query_info() local
2026 unsigned num_queries = r600_get_num_queries(rscreen); in r600_get_driver_query_info()
2030 r600_get_perfcounter_info(rscreen, 0, NULL); in r600_get_driver_query_info()
2036 return r600_get_perfcounter_info(rscreen, index - num_queries, info); in r600_get_driver_query_info()
2044 info->max_value.u64 = rscreen->info.vram_size; in r600_get_driver_query_info()
2049 info->max_value.u64 = rscreen->info.gart_size; in r600_get_driver_query_info()
2055 info->max_value.u64 = rscreen->info.vram_vis_size; in r600_get_driver_query_info()
2059 if (info->group_id != ~(unsigned)0 && rscreen->perfcounters) in r600_get_driver_query_info()
2060 info->group_id += rscreen->perfcounters->num_groups; in r600_get_driver_query_info()
2073 struct r600_common_screen *rscreen = (struct r600_common_screen *)screen; in r600_get_driver_query_group_info() local
2076 if (rscreen->perfcounters) in r600_get_driver_query_group_info()
2077 num_pc_groups = rscreen->perfcounters->num_groups; in r600_get_driver_query_group_info()
2083 return r600_get_perfcounter_group_info(rscreen, index, info); in r600_get_driver_query_group_info()
2112 void r600_init_screen_query_functions(struct r600_common_screen *rscreen) in r600_init_screen_query_functions() argument
2114 rscreen->b.get_driver_query_info = r600_get_driver_query_info; in r600_init_screen_query_functions()
2115 rscreen->b.get_driver_query_group_info = r600_get_driver_query_group_info; in r600_init_screen_query_functions()