From: Andreas Hartmetz Date: Tue, 7 Jan 2014 00:51:30 +0000 (+0100) Subject: radeonsi: Rename r600->si for structs in si.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e81883a4267807d654db8f739a32604d519816c;p=mesa.git radeonsi: Rename r600->si for structs in si.h. Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si.h b/src/gallium/drivers/radeonsi/si.h index 466d52e3d5e..ef794b27e48 100644 --- a/src/gallium/drivers/radeonsi/si.h +++ b/src/gallium/drivers/radeonsi/si.h @@ -35,7 +35,7 @@ struct winsys_handle; /* R600/R700 STATES */ -struct r600_query { +struct si_query { union { uint64_t u64; boolean b; @@ -67,16 +67,16 @@ void si_get_backend_mask(struct si_context *ctx); 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); diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index d5637810f9e..bea2e6bd01f 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -295,7 +295,7 @@ static unsigned r600_query_read_result(char *map, unsigned start_index, unsigned 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; @@ -382,7 +382,7 @@ static boolean r600_query_result(struct si_context *ctx, struct r600_query *quer 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; @@ -471,7 +471,7 @@ 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_end(struct si_context *ctx, struct si_query *query) { struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs; uint64_t va; @@ -534,7 +534,7 @@ void r600_query_end(struct si_context *ctx, struct r600_query *query) } } -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; @@ -577,12 +577,12 @@ void r600_query_predication(struct si_context *ctx, struct r600_query *query, in } } -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; @@ -633,14 +633,14 @@ struct r600_query *r600_context_query_create(struct si_context *ctx, unsigned qu 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; @@ -676,7 +676,7 @@ boolean r600_context_query_result(struct si_context *ctx, 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); @@ -686,7 +686,7 @@ void r600_context_queries_suspend(struct si_context *ctx) 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); diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c index dd6aff6ef9f..c59dbc1d88e 100644 --- a/src/gallium/drivers/radeonsi/si_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -34,13 +34,13 @@ static void r600_destroy_query(struct pipe_context *ctx, struct pipe_query *quer { 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); @@ -49,7 +49,7 @@ static void r600_begin_query(struct pipe_context *ctx, struct pipe_query *query) 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); @@ -59,7 +59,7 @@ static void r600_begin_query(struct pipe_context *ctx, struct pipe_query *query) 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)); @@ -77,7 +77,7 @@ static boolean r600_get_query_result(struct pipe_context *ctx, 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); } @@ -88,7 +88,7 @@ static void r600_render_condition(struct pipe_context *ctx, 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 */