}
}
-static void si_pc_query_destroy(struct si_screen *sscreen,
+static void si_pc_query_destroy(struct si_context *sctx,
struct si_query *squery)
{
struct si_query_pc *query = (struct si_query_pc *)squery;
FREE(query->counters);
- si_query_buffer_destroy(sscreen, &query->buffer);
+ si_query_buffer_destroy(sctx->screen, &query->buffer);
FREE(query);
}
return (struct pipe_query *)query;
error:
- si_pc_query_destroy(screen, &query->b);
+ si_pc_query_destroy((struct si_context *)ctx, &query->b);
return NULL;
}
struct pipe_fence_handle *fence;
};
-static void si_query_sw_destroy(struct si_screen *sscreen,
+static void si_query_sw_destroy(struct si_context *sctx,
struct si_query *squery)
{
struct si_query_sw *query = (struct si_query_sw *)squery;
- sscreen->b.fence_reference(&sscreen->b, &query->fence, NULL);
+ sctx->b.screen->fence_reference(sctx->b.screen, &query->fence, NULL);
FREE(query);
}
}
-void si_query_hw_destroy(struct si_screen *sscreen,
- struct si_query *squery)
+void si_query_hw_destroy(struct si_context *sctx, struct si_query *squery)
{
struct si_query_hw *query = (struct si_query_hw *)squery;
- si_query_buffer_destroy(sscreen, &query->buffer);
+ si_query_buffer_destroy(sctx->screen, &query->buffer);
si_resource_reference(&query->workaround_buf, NULL);
FREE(squery);
}
struct si_context *sctx = (struct si_context *)ctx;
struct si_query *squery = (struct si_query *)query;
- squery->ops->destroy(sctx->screen, squery);
+ squery->ops->destroy(sctx, squery);
}
static boolean si_begin_query(struct pipe_context *ctx,
};
struct si_query_ops {
- void (*destroy)(struct si_screen *, struct si_query *);
+ void (*destroy)(struct si_context *, struct si_query *);
bool (*begin)(struct si_context *, struct si_query *);
bool (*end)(struct si_context *, struct si_query *);
bool (*get_result)(struct si_context *,
unsigned workaround_offset;
};
-void si_query_hw_destroy(struct si_screen *sscreen,
+void si_query_hw_destroy(struct si_context *sctx,
struct si_query *squery);
bool si_query_hw_begin(struct si_context *sctx,
struct si_query *squery);