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