summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_perfcounter.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-03-01 19:24:42 +0100
committerMarek Olšák <[email protected]>2017-03-17 18:30:21 +0100
commit4b064d16e575ff7155cdcc63f0496ad6b5bc20c7 (patch)
tree82802b6aeb60ea845f67499dd322081117fc9a01 /src/gallium/drivers/radeon/r600_perfcounter.c
parentbe6173e7d6c0c192175c37158eefcf1c159ceb16 (diff)
gallium/radeon: formalize that create_batch_query doesn't need pipe_context
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_perfcounter.c')
-rw-r--r--src/gallium/drivers/radeon/r600_perfcounter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeon/r600_perfcounter.c b/src/gallium/drivers/radeon/r600_perfcounter.c
index 0c2c6e9bf5e..bf24aabba0b 100644
--- a/src/gallium/drivers/radeon/r600_perfcounter.c
+++ b/src/gallium/drivers/radeon/r600_perfcounter.c
@@ -99,7 +99,7 @@ struct r600_query_pc {
struct r600_pc_group *groups;
};
-static void r600_pc_query_destroy(struct r600_common_context *ctx,
+static void r600_pc_query_destroy(struct r600_common_screen *rscreen,
struct r600_query *rquery)
{
struct r600_query_pc *query = (struct r600_query_pc *)rquery;
@@ -112,7 +112,7 @@ static void r600_pc_query_destroy(struct r600_common_context *ctx,
FREE(query->counters);
- r600_query_hw_destroy(ctx, rquery);
+ r600_query_hw_destroy(rscreen, rquery);
}
static bool r600_pc_query_prepare_buffer(struct r600_common_screen *screen,
@@ -301,8 +301,8 @@ struct pipe_query *r600_create_batch_query(struct pipe_context *ctx,
unsigned num_queries,
unsigned *query_types)
{
- struct r600_common_context *rctx = (struct r600_common_context *)ctx;
- struct r600_common_screen *screen = rctx->screen;
+ struct r600_common_screen *screen =
+ (struct r600_common_screen *)ctx->screen;
struct r600_perfcounters *pc = screen->perfcounters;
struct r600_perfcounter_block *block;
struct r600_pc_group *group;
@@ -365,7 +365,7 @@ struct pipe_query *r600_create_batch_query(struct pipe_context *ctx,
unsigned instances = 1;
if ((block->flags & R600_PC_BLOCK_SE) && group->se < 0)
- instances = rctx->screen->info.max_se;
+ instances = screen->info.max_se;
if (group->instance < 0)
instances *= block->num_instances;
@@ -423,7 +423,7 @@ struct pipe_query *r600_create_batch_query(struct pipe_context *ctx,
return (struct pipe_query *)query;
error:
- r600_pc_query_destroy(rctx, &query->b.b);
+ r600_pc_query_destroy(screen, &query->b.b);
return NULL;
}