diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_perfcounter.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 13 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.h | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/r600_perfcounter.c b/src/gallium/drivers/radeon/r600_perfcounter.c index bf24aabba0b..48f609bcb41 100644 --- a/src/gallium/drivers/radeon/r600_perfcounter.c +++ b/src/gallium/drivers/radeon/r600_perfcounter.c @@ -196,7 +196,7 @@ static void r600_pc_query_clear_result(struct r600_query_hw *hwquery, memset(result, 0, sizeof(result->batch[0]) * query->num_counters); } -static void r600_pc_query_add_result(struct r600_common_context *ctx, +static void r600_pc_query_add_result(struct r600_common_screen *rscreen, struct r600_query_hw *hwquery, void *buffer, union pipe_query_result *result) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index dcd217b155b..cb90850a505 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -515,7 +515,7 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx, struct r600_query_hw *query, struct r600_resource *buffer, uint64_t va); -static void r600_query_hw_add_result(struct r600_common_context *ctx, +static void r600_query_hw_add_result(struct r600_common_screen *rscreen, struct r600_query_hw *, void *buffer, union pipe_query_result *result); static void r600_query_hw_clear_result(struct r600_query_hw *, @@ -1046,12 +1046,12 @@ static unsigned r600_query_read_result(void *map, unsigned start_index, unsigned return 0; } -static void r600_query_hw_add_result(struct r600_common_context *ctx, +static void r600_query_hw_add_result(struct r600_common_screen *rscreen, struct r600_query_hw *query, void *buffer, union pipe_query_result *result) { - unsigned max_rbs = ctx->screen->info.num_render_backends; + unsigned max_rbs = rscreen->info.num_render_backends; switch (query->b.type) { case PIPE_QUERY_OCCLUSION_COUNTER: { @@ -1101,7 +1101,7 @@ static void r600_query_hw_add_result(struct r600_common_context *ctx, r600_query_read_result(buffer, 0, 4, true); break; case PIPE_QUERY_PIPELINE_STATISTICS: - if (ctx->chip_class >= EVERGREEN) { + if (rscreen->chip_class >= EVERGREEN) { result->pipeline_statistics.ps_invocations += r600_query_read_result(buffer, 0, 22, false); result->pipeline_statistics.c_primitives += @@ -1199,6 +1199,7 @@ bool r600_query_hw_get_result(struct r600_common_context *rctx, struct r600_query *rquery, bool wait, union pipe_query_result *result) { + struct r600_common_screen *rscreen = rctx->screen; struct r600_query_hw *query = (struct r600_query_hw *)rquery; struct r600_query_buffer *qbuf; @@ -1215,7 +1216,7 @@ bool r600_query_hw_get_result(struct r600_common_context *rctx, return false; while (results_base != qbuf->results_end) { - query->ops->add_result(rctx, query, map + results_base, + query->ops->add_result(rscreen, query, map + results_base, result); results_base += query->result_size; } @@ -1224,7 +1225,7 @@ bool r600_query_hw_get_result(struct r600_common_context *rctx, /* Convert the time to expected units. */ if (rquery->type == PIPE_QUERY_TIME_ELAPSED || rquery->type == PIPE_QUERY_TIMESTAMP) { - result->u64 = (1000000 * result->u64) / rctx->screen->info.clock_crystal_freq; + result->u64 = (1000000 * result->u64) / rscreen->info.clock_crystal_freq; } return true; } diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index d39663a392b..b9ab44ca3f7 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -152,7 +152,7 @@ struct r600_query_hw_ops { struct r600_query_hw *, struct r600_resource *buffer, uint64_t va); void (*clear_result)(struct r600_query_hw *, union pipe_query_result *); - void (*add_result)(struct r600_common_context *ctx, + void (*add_result)(struct r600_common_screen *screen, struct r600_query_hw *, void *buffer, union pipe_query_result *result); }; |