diff options
author | Andreas Hartmetz <[email protected]> | 2014-01-07 02:14:42 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-01-14 00:07:13 +0100 |
commit | 280c360c0287608227466c6f366606ef5bd62cfa (patch) | |
tree | 627cf9b0d77c8db731c0d8a94d4fb84d0cc33c6d /src/gallium/drivers/radeonsi | |
parent | f2a21ed8b9aeb08d019a5aabaf6c581303254308 (diff) |
radeonsi: Rename r600->si for functions in si.h.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si.h | 16 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 56 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_query.c | 16 |
4 files changed, 46 insertions, 46 deletions
diff --git a/src/gallium/drivers/radeonsi/si.h b/src/gallium/drivers/radeonsi/si.h index ef794b27e48..46184ec33bd 100644 --- a/src/gallium/drivers/radeonsi/si.h +++ b/src/gallium/drivers/radeonsi/si.h @@ -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 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 si_query *si_context_query_create(struct si_context *ctx, unsigned query_type); +void si_context_query_destroy(struct si_context *ctx, struct si_query *query); +boolean si_context_query_result(struct si_context *ctx, struct si_query *query, boolean wait, void *vresult); -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 si_query *query, int operation, +void si_query_begin(struct si_context *ctx, struct si_query *query); +void si_query_end(struct si_context *ctx, struct si_query *query); +void si_context_queries_suspend(struct si_context *ctx); +void si_context_queries_resume(struct si_context *ctx); +void si_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_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 5c2ba3d96b2..d2725a923a9 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -51,7 +51,7 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op { struct si_context *rctx = (struct si_context *)ctx; - r600_context_queries_suspend(rctx); + si_context_queries_suspend(rctx); util_blitter_save_blend(rctx->blitter, rctx->queued.named.blend); util_blitter_save_depth_stencil_alpha(rctx->blitter, rctx->queued.named.dsa); @@ -100,7 +100,7 @@ static void r600_blitter_end(struct pipe_context *ctx) rctx->saved_render_cond_mode); rctx->saved_render_cond = NULL; } - r600_context_queries_resume(rctx); + si_context_queries_resume(rctx); } static unsigned u_max_sample(struct pipe_resource *r) diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 550fba43ade..b978a6c3c89 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -183,7 +183,7 @@ void si_context_flush(struct si_context *ctx, unsigned flags) /* suspend queries */ ctx->nontimer_queries_suspended = false; if (ctx->num_cs_dw_nontimer_queries_suspend) { - r600_context_queries_suspend(ctx); + si_context_queries_suspend(ctx); ctx->nontimer_queries_suspended = true; } @@ -271,14 +271,14 @@ void si_begin_new_cs(struct si_context *ctx) /* resume queries */ if (ctx->nontimer_queries_suspended) { - r600_context_queries_resume(ctx); + si_context_queries_resume(ctx); } si_all_descriptors_begin_new_cs(ctx); } -static unsigned r600_query_read_result(char *map, unsigned start_index, unsigned end_index, - bool test_status_bit) +static unsigned si_query_read_result(char *map, unsigned start_index, unsigned end_index, + bool test_status_bit) { uint32_t *current_result = (uint32_t*)map; uint64_t start, end; @@ -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 si_query *query, boolean wait) +static boolean si_query_result(struct si_context *ctx, struct si_query *query, boolean wait) { unsigned results_base = query->results_start; char *map; @@ -311,14 +311,14 @@ static boolean r600_query_result(struct si_context *ctx, struct si_query *query, case PIPE_QUERY_OCCLUSION_COUNTER: while (results_base != query->results_end) { query->result.u64 += - r600_query_read_result(map + results_base, 0, 2, true); + si_query_read_result(map + results_base, 0, 2, true); results_base = (results_base + 16) % query->buffer->b.b.width0; } break; case PIPE_QUERY_OCCLUSION_PREDICATE: while (results_base != query->results_end) { query->result.b = query->result.b || - r600_query_read_result(map + results_base, 0, 2, true) != 0; + si_query_read_result(map + results_base, 0, 2, true) != 0; results_base = (results_base + 16) % query->buffer->b.b.width0; } break; @@ -331,7 +331,7 @@ static boolean r600_query_result(struct si_context *ctx, struct si_query *query, case PIPE_QUERY_TIME_ELAPSED: while (results_base != query->results_end) { query->result.u64 += - r600_query_read_result(map + results_base, 0, 2, false); + si_query_read_result(map + results_base, 0, 2, false); results_base = (results_base + query->result_size) % query->buffer->b.b.width0; } break; @@ -344,7 +344,7 @@ static boolean r600_query_result(struct si_context *ctx, struct si_query *query, * We only need NumPrimitivesWritten here. */ while (results_base != query->results_end) { query->result.u64 += - r600_query_read_result(map + results_base, 2, 6, true); + si_query_read_result(map + results_base, 2, 6, true); results_base = (results_base + query->result_size) % query->buffer->b.b.width0; } break; @@ -352,24 +352,24 @@ static boolean r600_query_result(struct si_context *ctx, struct si_query *query, /* Here we read PrimitiveStorageNeeded. */ while (results_base != query->results_end) { query->result.u64 += - r600_query_read_result(map + results_base, 0, 4, true); + si_query_read_result(map + results_base, 0, 4, true); results_base = (results_base + query->result_size) % query->buffer->b.b.width0; } break; case PIPE_QUERY_SO_STATISTICS: while (results_base != query->results_end) { query->result.so.num_primitives_written += - r600_query_read_result(map + results_base, 2, 6, true); + si_query_read_result(map + results_base, 2, 6, true); query->result.so.primitives_storage_needed += - r600_query_read_result(map + results_base, 0, 4, true); + si_query_read_result(map + results_base, 0, 4, true); results_base = (results_base + query->result_size) % query->buffer->b.b.width0; } break; case PIPE_QUERY_SO_OVERFLOW_PREDICATE: while (results_base != query->results_end) { query->result.b = query->result.b || - r600_query_read_result(map + results_base, 2, 6, true) != - r600_query_read_result(map + results_base, 0, 4, true); + si_query_read_result(map + results_base, 2, 6, true) != + si_query_read_result(map + results_base, 0, 4, true); results_base = (results_base + query->result_size) % query->buffer->b.b.width0; } break; @@ -382,7 +382,7 @@ static boolean r600_query_result(struct si_context *ctx, struct si_query *query, return TRUE; } -void r600_query_begin(struct si_context *ctx, struct si_query *query) +void si_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; @@ -395,7 +395,7 @@ void r600_query_begin(struct si_context *ctx, struct si_query *query) /* collect current results if query buffer is full */ if (new_results_end == query->results_start) { - r600_query_result(ctx, query, TRUE); + si_query_result(ctx, query, TRUE); } switch (query->type) { @@ -471,7 +471,7 @@ 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 si_query_end(struct si_context *ctx, struct si_query *query) { struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs; uint64_t va; @@ -485,7 +485,7 @@ void r600_query_end(struct si_context *ctx, struct si_query *query) /* collect current results if query buffer is full */ if (new_results_end == query->results_start) { - r600_query_result(ctx, query, TRUE); + si_query_result(ctx, query, TRUE); } } @@ -534,8 +534,8 @@ void r600_query_end(struct si_context *ctx, struct si_query *query) } } -void r600_query_predication(struct si_context *ctx, struct si_query *query, int operation, - int flag_wait) +void si_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; uint64_t va; @@ -577,7 +577,7 @@ void r600_query_predication(struct si_context *ctx, struct si_query *query, int } } -struct si_query *r600_context_query_create(struct si_context *ctx, unsigned query_type) +struct si_query *si_context_query_create(struct si_context *ctx, unsigned query_type) { struct si_query *query; unsigned buffer_size = 4096; @@ -633,13 +633,13 @@ struct si_query *r600_context_query_create(struct si_context *ctx, unsigned quer return query; } -void r600_context_query_destroy(struct si_context *ctx, struct si_query *query) +void si_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, +boolean si_context_query_result(struct si_context *ctx, struct si_query *query, boolean wait, void *vresult) { @@ -648,7 +648,7 @@ boolean r600_context_query_result(struct si_context *ctx, struct pipe_query_data_so_statistics *result_so = (struct pipe_query_data_so_statistics*)vresult; - if (!r600_query_result(ctx, query, wait)) + if (!si_query_result(ctx, query, wait)) return FALSE; switch (query->type) { @@ -674,24 +674,24 @@ boolean r600_context_query_result(struct si_context *ctx, return TRUE; } -void r600_context_queries_suspend(struct si_context *ctx) +void si_context_queries_suspend(struct si_context *ctx) { struct si_query *query; LIST_FOR_EACH_ENTRY(query, &ctx->active_nontimer_query_list, list) { - r600_query_end(ctx, query); + si_query_end(ctx, query); } assert(ctx->num_cs_dw_nontimer_queries_suspend == 0); } -void r600_context_queries_resume(struct si_context *ctx) +void si_context_queries_resume(struct si_context *ctx) { struct si_query *query; assert(ctx->num_cs_dw_nontimer_queries_suspend == 0); LIST_FOR_EACH_ENTRY(query, &ctx->active_nontimer_query_list, list) { - r600_query_begin(ctx, query); + si_query_begin(ctx, query); } } diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c index c59dbc1d88e..a847c562aee 100644 --- a/src/gallium/drivers/radeonsi/si_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -27,14 +27,14 @@ static struct pipe_query *r600_create_query(struct pipe_context *ctx, unsigned q { struct si_context *rctx = (struct si_context *)ctx; - return (struct pipe_query*)r600_context_query_create(rctx, query_type); + return (struct pipe_query*)si_context_query_create(rctx, query_type); } static void r600_destroy_query(struct pipe_context *ctx, struct pipe_query *query) { struct si_context *rctx = (struct si_context *)ctx; - r600_context_query_destroy(rctx, (struct si_query *)query); + si_context_query_destroy(rctx, (struct si_query *)query); } static void r600_begin_query(struct pipe_context *ctx, struct pipe_query *query) @@ -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 si_query *)query); + si_query_begin(rctx, (struct si_query *)query); if (!si_is_timer_query(rquery->type)) { LIST_ADDTAIL(&rquery->list, &rctx->active_nontimer_query_list); @@ -65,7 +65,7 @@ static void r600_end_query(struct pipe_context *ctx, struct pipe_query *query) memset(&rquery->result, 0, sizeof(rquery->result)); } - r600_query_end(rctx, rquery); + si_query_end(rctx, rquery); if (si_query_needs_begin(rquery->type) && !si_is_timer_query(rquery->type)) { LIST_DELINIT(&rquery->list); @@ -79,7 +79,7 @@ static boolean r600_get_query_result(struct pipe_context *ctx, struct si_context *rctx = (struct si_context *)ctx; struct si_query *rquery = (struct si_query *)query; - return r600_context_query_result(rctx, rquery, wait, vresult); + return si_context_query_result(rctx, rquery, wait, vresult); } static void r600_render_condition(struct pipe_context *ctx, @@ -106,7 +106,7 @@ static void r600_render_condition(struct pipe_context *ctx, if (query == NULL) { if (rctx->predicate_drawing) { rctx->predicate_drawing = false; - r600_query_predication(rctx, NULL, PREDICATION_OP_CLEAR, 1); + si_query_predication(rctx, NULL, PREDICATION_OP_CLEAR, 1); } return; } @@ -121,13 +121,13 @@ static void r600_render_condition(struct pipe_context *ctx, switch (rquery->type) { case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: - r600_query_predication(rctx, rquery, PREDICATION_OP_ZPASS, wait_flag); + si_query_predication(rctx, rquery, PREDICATION_OP_ZPASS, wait_flag); break; case PIPE_QUERY_PRIMITIVES_EMITTED: case PIPE_QUERY_PRIMITIVES_GENERATED: case PIPE_QUERY_SO_STATISTICS: case PIPE_QUERY_SO_OVERFLOW_PREDICATE: - r600_query_predication(rctx, rquery, PREDICATION_OP_PRIMCOUNT, wait_flag); + si_query_predication(rctx, rquery, PREDICATION_OP_PRIMCOUNT, wait_flag); break; default: assert(0); |