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;
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,
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;
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;
return (struct pipe_query *)query;
error:
- r600_pc_query_destroy(rctx, &query->b.b);
+ r600_pc_query_destroy(screen, &query->b.b);
return NULL;
}
struct pipe_fence_handle *fence;
};
-static void r600_query_sw_destroy(struct r600_common_context *rctx,
+static void r600_query_sw_destroy(struct r600_common_screen *rscreen,
struct r600_query *rquery)
{
- struct pipe_screen *screen = rctx->b.screen;
struct r600_query_sw *query = (struct r600_query_sw *)rquery;
- screen->fence_reference(screen, &query->fence, NULL);
+ rscreen->b.fence_reference(&rscreen->b, &query->fence, NULL);
FREE(query);
}
return (struct pipe_query *)query;
}
-void r600_query_hw_destroy(struct r600_common_context *rctx,
+void r600_query_hw_destroy(struct r600_common_screen *rscreen,
struct r600_query *rquery)
{
struct r600_query_hw *query = (struct r600_query_hw *)rquery;
struct r600_common_context *rctx = (struct r600_common_context *)ctx;
struct r600_query *rquery = (struct r600_query *)query;
- rquery->ops->destroy(rctx, rquery);
+ rquery->ops->destroy(rctx->screen, rquery);
}
static boolean r600_begin_query(struct pipe_context *ctx,
};
struct r600_query_ops {
- void (*destroy)(struct r600_common_context *, struct r600_query *);
+ void (*destroy)(struct r600_common_screen *, struct r600_query *);
bool (*begin)(struct r600_common_context *, struct r600_query *);
bool (*end)(struct r600_common_context *, struct r600_query *);
bool (*get_result)(struct r600_common_context *,
bool r600_query_hw_init(struct r600_common_screen *rscreen,
struct r600_query_hw *query);
-void r600_query_hw_destroy(struct r600_common_context *rctx,
+void r600_query_hw_destroy(struct r600_common_screen *rscreen,
struct r600_query *rquery);
bool r600_query_hw_begin(struct r600_common_context *rctx,
struct r600_query *rquery);