Lines Matching refs:rctx
253 struct r600_context *rctx = (struct r600_context *)ctx; in r600_create_query() local
266 query->result_size = 16 * rctx->max_db; in r600_create_query()
291 query->buffer.buf = r600_new_query_buffer(rctx, query_type); in r600_create_query()
316 static void r600_update_occlusion_query_state(struct r600_context *rctx, in r600_update_occlusion_query_state() argument
323 rctx->num_occlusion_queries += diff; in r600_update_occlusion_query_state()
324 assert(rctx->num_occlusion_queries >= 0); in r600_update_occlusion_query_state()
326 enable = rctx->num_occlusion_queries != 0; in r600_update_occlusion_query_state()
328 if (rctx->db_misc_state.occlusion_query_enabled != enable) { in r600_update_occlusion_query_state()
329 rctx->db_misc_state.occlusion_query_enabled = enable; in r600_update_occlusion_query_state()
330 r600_atom_dirty(rctx, &rctx->db_misc_state.atom); in r600_update_occlusion_query_state()
337 struct r600_context *rctx = (struct r600_context *)ctx; in r600_begin_query() local
355 …if (rctx->ws->cs_is_buffer_referenced(rctx->cs, rquery->buffer.buf->cs_buf, RADEON_USAGE_READWRITE… in r600_begin_query()
356 rctx->ws->buffer_is_busy(rquery->buffer.buf->buf, RADEON_USAGE_READWRITE)) { in r600_begin_query()
358 rquery->buffer.buf = r600_new_query_buffer(rctx, rquery->type); in r600_begin_query()
364 r600_update_occlusion_query_state(rctx, rquery->type, 1); in r600_begin_query()
366 r600_emit_query_begin(rctx, rquery); in r600_begin_query()
369 LIST_ADDTAIL(&rquery->list, &rctx->active_timer_queries); in r600_begin_query()
371 LIST_ADDTAIL(&rquery->list, &rctx->active_nontimer_queries); in r600_begin_query()
377 struct r600_context *rctx = (struct r600_context *)ctx; in r600_end_query() local
380 r600_emit_query_end(rctx, rquery); in r600_end_query()
386 r600_update_occlusion_query_state(rctx, rquery->type, -1); in r600_end_query()
502 struct r600_context *rctx = (struct r600_context *)ctx; in r600_get_query_result() local
509 if (!r600_get_query_buffer_result(rctx, rquery, qbuf, wait, result)) { in r600_get_query_result()
517 result->u64 = (1000000 * result->u64) / rctx->screen->info.r600_clock_crystal_freq; in r600_get_query_result()
526 struct r600_context *rctx = (struct r600_context *)ctx; in r600_render_condition() local
530 rctx->current_render_cond = query; in r600_render_condition()
531 rctx->current_render_cond_mode = mode; in r600_render_condition()
534 if (rctx->predicate_drawing) { in r600_render_condition()
535 rctx->predicate_drawing = false; in r600_render_condition()
536 r600_emit_query_predication(rctx, NULL, PREDICATION_OP_CLEAR, false); in r600_render_condition()
546 rctx->predicate_drawing = true; in r600_render_condition()
551 r600_emit_query_predication(rctx, rquery, PREDICATION_OP_ZPASS, wait_flag); in r600_render_condition()
557 r600_emit_query_predication(rctx, rquery, PREDICATION_OP_PRIMCOUNT, wait_flag); in r600_render_condition()
607 void r600_init_query_functions(struct r600_context *rctx) in r600_init_query_functions() argument
609 rctx->context.create_query = r600_create_query; in r600_init_query_functions()
610 rctx->context.destroy_query = r600_destroy_query; in r600_init_query_functions()
611 rctx->context.begin_query = r600_begin_query; in r600_init_query_functions()
612 rctx->context.end_query = r600_end_query; in r600_init_query_functions()
613 rctx->context.get_query_result = r600_get_query_result; in r600_init_query_functions()
615 if (rctx->screen->info.r600_num_backends > 0) in r600_init_query_functions()
616 rctx->context.render_condition = r600_render_condition; in r600_init_query_functions()