struct winsys_handle;
/* R600/R700 STATES */
-struct r600_query {
+struct si_query {
union {
uint64_t u64;
boolean b;
void si_context_flush(struct si_context *ctx, unsigned flags);
void si_begin_new_cs(struct si_context *ctx);
-struct r600_query *r600_context_query_create(struct si_context *ctx, unsigned query_type);
-void r600_context_query_destroy(struct si_context *ctx, struct r600_query *query);
+struct si_query *r600_context_query_create(struct si_context *ctx, unsigned query_type);
+void r600_context_query_destroy(struct si_context *ctx, struct si_query *query);
boolean r600_context_query_result(struct si_context *ctx,
- struct r600_query *query,
+ struct si_query *query,
boolean wait, void *vresult);
-void r600_query_begin(struct si_context *ctx, struct r600_query *query);
-void r600_query_end(struct si_context *ctx, struct r600_query *query);
+void r600_query_begin(struct si_context *ctx, struct si_query *query);
+void r600_query_end(struct si_context *ctx, struct si_query *query);
void r600_context_queries_suspend(struct si_context *ctx);
void r600_context_queries_resume(struct si_context *ctx);
-void r600_query_predication(struct si_context *ctx, struct r600_query *query, int operation,
+void r600_query_predication(struct si_context *ctx, struct si_query *query, int operation,
int flag_wait);
bool si_is_timer_query(unsigned type);
return 0;
}
-static boolean r600_query_result(struct si_context *ctx, struct r600_query *query, boolean wait)
+static boolean r600_query_result(struct si_context *ctx, struct si_query *query, boolean wait)
{
unsigned results_base = query->results_start;
char *map;
return TRUE;
}
-void r600_query_begin(struct si_context *ctx, struct r600_query *query)
+void r600_query_begin(struct si_context *ctx, struct si_query *query)
{
struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
unsigned new_results_end, i;
}
}
-void r600_query_end(struct si_context *ctx, struct r600_query *query)
+void r600_query_end(struct si_context *ctx, struct si_query *query)
{
struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
uint64_t va;
}
}
-void r600_query_predication(struct si_context *ctx, struct r600_query *query, int operation,
+void r600_query_predication(struct si_context *ctx, struct si_query *query, int operation,
int flag_wait)
{
struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
}
}
-struct r600_query *r600_context_query_create(struct si_context *ctx, unsigned query_type)
+struct si_query *r600_context_query_create(struct si_context *ctx, unsigned query_type)
{
- struct r600_query *query;
+ struct si_query *query;
unsigned buffer_size = 4096;
- query = CALLOC_STRUCT(r600_query);
+ query = CALLOC_STRUCT(si_query);
if (query == NULL)
return NULL;
return query;
}
-void r600_context_query_destroy(struct si_context *ctx, struct r600_query *query)
+void r600_context_query_destroy(struct si_context *ctx, struct si_query *query)
{
r600_resource_reference(&query->buffer, NULL);
free(query);
}
boolean r600_context_query_result(struct si_context *ctx,
- struct r600_query *query,
+ struct si_query *query,
boolean wait, void *vresult)
{
boolean *result_b = (boolean*)vresult;
void r600_context_queries_suspend(struct si_context *ctx)
{
- struct r600_query *query;
+ struct si_query *query;
LIST_FOR_EACH_ENTRY(query, &ctx->active_nontimer_query_list, list) {
r600_query_end(ctx, query);
void r600_context_queries_resume(struct si_context *ctx)
{
- struct r600_query *query;
+ struct si_query *query;
assert(ctx->num_cs_dw_nontimer_queries_suspend == 0);
{
struct si_context *rctx = (struct si_context *)ctx;
- r600_context_query_destroy(rctx, (struct r600_query *)query);
+ r600_context_query_destroy(rctx, (struct si_query *)query);
}
static void r600_begin_query(struct pipe_context *ctx, struct pipe_query *query)
{
struct si_context *rctx = (struct si_context *)ctx;
- struct r600_query *rquery = (struct r600_query *)query;
+ struct si_query *rquery = (struct si_query *)query;
if (!si_query_needs_begin(rquery->type)) {
assert(0);
memset(&rquery->result, 0, sizeof(rquery->result));
rquery->results_start = rquery->results_end;
- r600_query_begin(rctx, (struct r600_query *)query);
+ r600_query_begin(rctx, (struct si_query *)query);
if (!si_is_timer_query(rquery->type)) {
LIST_ADDTAIL(&rquery->list, &rctx->active_nontimer_query_list);
static void r600_end_query(struct pipe_context *ctx, struct pipe_query *query)
{
struct si_context *rctx = (struct si_context *)ctx;
- struct r600_query *rquery = (struct r600_query *)query;
+ struct si_query *rquery = (struct si_query *)query;
if (!si_query_needs_begin(rquery->type)) {
memset(&rquery->result, 0, sizeof(rquery->result));
boolean wait, union pipe_query_result *vresult)
{
struct si_context *rctx = (struct si_context *)ctx;
- struct r600_query *rquery = (struct r600_query *)query;
+ struct si_query *rquery = (struct si_query *)query;
return r600_context_query_result(rctx, rquery, wait, vresult);
}
uint mode)
{
struct si_context *rctx = (struct si_context *)ctx;
- struct r600_query *rquery = (struct r600_query *)query;
+ struct si_query *rquery = (struct si_query *)query;
int wait_flag = 0;
/* If we already have nonzero result, render unconditionally */