diff options
author | Dave Airlie <[email protected]> | 2010-09-30 09:07:07 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-09-30 09:12:57 +1000 |
commit | dbcd6526021c50770c3e5e04b04dc64c70298124 (patch) | |
tree | 818f4527cf1461723478c5c576ae835851808405 /src | |
parent | 2bc9d3f49837eb56f2602974004552e7852bfe0b (diff) |
r600g: clean up some code from move to new paths.
mainly remove 2 suffix from function names
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 24 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 22 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 12 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_hw_context.c | 9 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_priv.h | 2 |
9 files changed, 44 insertions, 51 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index a30025642d2..64fadb16e0b 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -974,7 +974,7 @@ static void *evergreen_create_shader_state(struct pipe_context *ctx, int r; shader->shader.use_mem_constant = TRUE; - r = r600_pipe_shader_create2(ctx, shader, state->tokens); + r = r600_pipe_shader_create(ctx, shader, state->tokens); if (r) { return NULL; } @@ -1021,7 +1021,7 @@ static void evergreen_delete_vs_shader(struct pipe_context *ctx, void *state) free(shader); } -void evergreen_init_state_functions2(struct r600_pipe_context *rctx) +void evergreen_init_state_functions(struct r600_pipe_context *rctx) { rctx->context.create_blend_state = evergreen_create_blend_state; rctx->context.create_depth_stencil_alpha_state = evergreen_create_dsa_state; @@ -1062,7 +1062,7 @@ void evergreen_init_state_functions2(struct r600_pipe_context *rctx) rctx->context.sampler_view_destroy = evergreen_sampler_view_destroy; } -void evergreen_init_config2(struct r600_pipe_context *rctx) +void evergreen_init_config(struct r600_pipe_context *rctx) { struct r600_pipe_state *rstate = &rctx->config; int ps_prio; @@ -1399,9 +1399,9 @@ void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info) return; /* rebuild vertex shader if input format changed */ - if (r600_pipe_shader_update2(&rctx->context, rctx->vs_shader)) + if (r600_pipe_shader_update(&rctx->context, rctx->vs_shader)) return; - if (r600_pipe_shader_update2(&rctx->context, rctx->ps_shader)) + if (r600_pipe_shader_update(&rctx->context, rctx->ps_shader)) return; for (i = 0 ; i < rctx->vertex_elements->count; i++) { @@ -1519,7 +1519,7 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader rstate->nregs = 0; for (i = 0; i < rshader->ninput; i++) { - tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index2(&rctx->vs_shader->shader, rshader, i)); + tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i)); if (rshader->input[i].name == TGSI_SEMANTIC_POSITION) have_pos = TRUE; if (rshader->input[i].name == TGSI_SEMANTIC_COLOR || diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index a19f494ea0c..4bf44a171af 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -50,7 +50,7 @@ static void r600_blitter_save_states(struct pipe_context *ctx) /* TODO queries */ } -int r600_blit_uncompress_depth2(struct pipe_context *ctx, struct r600_resource_texture *texture) +int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture) { struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; struct pipe_framebuffer_state fb = *rctx->pframebuffer; @@ -155,7 +155,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx, src, subsrc, srcx, srcy, srcz, width, height); } -void r600_init_blit_functions2(struct r600_pipe_context *rctx) +void r600_init_blit_functions(struct r600_pipe_context *rctx) { rctx->context.clear = r600_clear; rctx->context.clear_render_target = r600_clear_render_target; diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 3c4424039b5..cf3d58e5068 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -87,7 +87,7 @@ static void *r600_create_db_flush_dsa(struct r600_pipe_context *rctx) return rstate; } -static void r600_flush2(struct pipe_context *ctx, unsigned flags, +static void r600_flush(struct pipe_context *ctx, unsigned flags, struct pipe_fence_handle **fence) { struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; @@ -128,7 +128,7 @@ static void r600_destroy_context(struct pipe_context *context) FREE(rctx); } -static struct pipe_context *r600_create_context2(struct pipe_screen *screen, void *priv) +static struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv) { struct r600_pipe_context *rctx = CALLOC_STRUCT(r600_pipe_context); struct r600_screen* rscreen = (struct r600_screen *)screen; @@ -139,16 +139,16 @@ static struct pipe_context *r600_create_context2(struct pipe_screen *screen, voi rctx->context.screen = screen; rctx->context.priv = priv; rctx->context.destroy = r600_destroy_context; - rctx->context.flush = r600_flush2; + rctx->context.flush = r600_flush; /* Easy accessing of screen/winsys. */ rctx->screen = rscreen; rctx->radeon = rscreen->radeon; rctx->family = r600_get_family(rctx->radeon); - r600_init_blit_functions2(rctx); + r600_init_blit_functions(rctx); r600_init_query_functions(rctx); - r600_init_context_resource_functions2(rctx); + r600_init_context_resource_functions(rctx); switch (r600_get_family(rctx->radeon)) { case CHIP_R600: @@ -163,13 +163,13 @@ static struct pipe_context *r600_create_context2(struct pipe_screen *screen, voi case CHIP_RV730: case CHIP_RV710: case CHIP_RV740: - rctx->context.draw_vbo = r600_draw_vbo2; - r600_init_state_functions2(rctx); + rctx->context.draw_vbo = r600_draw_vbo; + r600_init_state_functions(rctx); if (r600_context_init(&rctx->ctx, rctx->radeon)) { r600_destroy_context(&rctx->context); return NULL; } - r600_init_config2(rctx); + r600_init_config(rctx); break; case CHIP_CEDAR: case CHIP_REDWOOD: @@ -177,12 +177,12 @@ static struct pipe_context *r600_create_context2(struct pipe_screen *screen, voi case CHIP_CYPRESS: case CHIP_HEMLOCK: rctx->context.draw_vbo = evergreen_draw; - evergreen_init_state_functions2(rctx); + evergreen_init_state_functions(rctx); if (evergreen_context_init(&rctx->ctx, rctx->radeon)) { r600_destroy_context(&rctx->context); return NULL; } - evergreen_init_config2(rctx); + evergreen_init_config(rctx); break; default: R600_ERR("unsupported family %d\n", r600_get_family(rctx->radeon)); @@ -212,7 +212,7 @@ static struct pipe_context *r600_create_context2(struct pipe_screen *screen, voi rctx->custom_dsa_flush = r600_create_db_flush_dsa(rctx); - r600_blit_uncompress_depth_ptr = r600_blit_uncompress_depth2; + r600_blit_uncompress_depth_ptr = r600_blit_uncompress_depth; return &rctx->context; } @@ -440,7 +440,7 @@ struct pipe_screen *r600_screen_create(struct radeon *radeon) rscreen->screen.get_shader_param = r600_get_shader_param; rscreen->screen.get_paramf = r600_get_paramf; rscreen->screen.is_format_supported = r600_is_format_supported; - rscreen->screen.context_create = r600_create_context2; + rscreen->screen.context_create = r600_create_context; r600_init_screen_texture_functions(&rscreen->screen); r600_init_screen_resource_functions(&rscreen->screen); diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 98ed8b7c69c..a3b8f66c092 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -146,15 +146,15 @@ struct r600_drawl { }; /* evergreen_state.c */ -void evergreen_init_state_functions2(struct r600_pipe_context *rctx); -void evergreen_init_config2(struct r600_pipe_context *rctx); +void evergreen_init_state_functions(struct r600_pipe_context *rctx); +void evergreen_init_config(struct r600_pipe_context *rctx); void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info); void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader); void evergreen_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader); /* r600_blit.c */ -void r600_init_blit_functions2(struct r600_pipe_context *rctx); -int r600_blit_uncompress_depth2(struct pipe_context *ctx, struct r600_resource_texture *texture); +void r600_init_blit_functions(struct r600_pipe_context *rctx); +int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture); /* r600_buffer.c */ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen, @@ -174,18 +174,18 @@ int r600_upload_user_buffers(struct r600_pipe_context *rctx); void r600_init_query_functions(struct r600_pipe_context *rctx); /* r600_resource.c */ -void r600_init_context_resource_functions2(struct r600_pipe_context *r600); +void r600_init_context_resource_functions(struct r600_pipe_context *r600); /* r600_shader.c */ -int r600_pipe_shader_update2(struct pipe_context *ctx, struct r600_pipe_shader *shader); -int r600_pipe_shader_create2(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens); -int r600_find_vs_semantic_index2(struct r600_shader *vs, +int r600_pipe_shader_update(struct pipe_context *ctx, struct r600_pipe_shader *shader); +int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens); +int r600_find_vs_semantic_index(struct r600_shader *vs, struct r600_shader *ps, int id); /* r600_state.c */ -void r600_init_state_functions2(struct r600_pipe_context *rctx); -void r600_draw_vbo2(struct pipe_context *ctx, const struct pipe_draw_info *info); -void r600_init_config2(struct r600_pipe_context *rctx); +void r600_init_state_functions(struct r600_pipe_context *rctx); +void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info); +void r600_init_config(struct r600_pipe_context *rctx); void r600_translate_index_buffer(struct r600_pipe_context *r600, struct pipe_resource **index_buffer, unsigned *index_size, diff --git a/src/gallium/drivers/r600/r600_resource.c b/src/gallium/drivers/r600/r600_resource.c index b8f490c344a..59edab0e24a 100644 --- a/src/gallium/drivers/r600/r600_resource.c +++ b/src/gallium/drivers/r600/r600_resource.c @@ -53,7 +53,7 @@ void r600_init_screen_resource_functions(struct pipe_screen *screen) screen->user_buffer_create = r600_user_buffer_create; } -void r600_init_context_resource_functions2(struct r600_pipe_context *r600) +void r600_init_context_resource_functions(struct r600_pipe_context *r600) { r600->context.get_transfer = u_get_transfer_vtbl; r600->context.transfer_map = u_transfer_map_vtbl; diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index a0cd830d26d..8d40079353a 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -83,7 +83,7 @@ static void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shade 0x00000000, 0xFFFFFFFF, shader->bo); } -int r600_find_vs_semantic_index2(struct r600_shader *vs, +int r600_find_vs_semantic_index(struct r600_shader *vs, struct r600_shader *ps, int id) { struct r600_shader_io *input = &ps->input[id]; @@ -109,7 +109,7 @@ static void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shade rstate->nregs = 0; for (i = 0; i < rshader->ninput; i++) { - tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index2(&rctx->vs_shader->shader, rshader, i)); + tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i)); tmp |= S_028644_SEL_CENTROID(1); if (rshader->input[i].name == TGSI_SEMANTIC_POSITION) have_pos = TRUE; @@ -267,7 +267,7 @@ static int r600_shader_update(struct pipe_context *ctx, struct r600_pipe_shader return r600_bc_build(&shader->bc); } -int r600_pipe_shader_update2(struct pipe_context *ctx, struct r600_pipe_shader *shader) +int r600_pipe_shader_update(struct pipe_context *ctx, struct r600_pipe_shader *shader) { struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; int r; @@ -287,7 +287,7 @@ int r600_pipe_shader_update2(struct pipe_context *ctx, struct r600_pipe_shader * } int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader); -int r600_pipe_shader_create2(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens) +int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens) { struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; int r; diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index f5ec5cde37b..23323f1ea2b 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -80,9 +80,9 @@ static void r600_draw_common(struct r600_drawl *draw) /* rebuild vertex shader if input format changed */ - if (r600_pipe_shader_update2(&rctx->context, rctx->vs_shader)) + if (r600_pipe_shader_update(&rctx->context, rctx->vs_shader)) return; - if (r600_pipe_shader_update2(&rctx->context, rctx->ps_shader)) + if (r600_pipe_shader_update(&rctx->context, rctx->ps_shader)) return; for (i = 0 ; i < rctx->vertex_elements->count; i++) { @@ -205,7 +205,7 @@ void r600_translate_index_buffer(struct r600_pipe_context *r600, } } -void r600_draw_vbo2(struct pipe_context *ctx, const struct pipe_draw_info *info) +void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) { struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx; struct r600_drawl draw; @@ -1191,7 +1191,7 @@ static void *r600_create_shader_state(struct pipe_context *ctx, struct r600_pipe_shader *shader = CALLOC_STRUCT(r600_pipe_shader); int r; - r = r600_pipe_shader_create2(ctx, shader, state->tokens); + r = r600_pipe_shader_create(ctx, shader, state->tokens); if (r) { return NULL; } @@ -1238,7 +1238,7 @@ static void r600_delete_vs_shader(struct pipe_context *ctx, void *state) free(shader); } -void r600_init_state_functions2(struct r600_pipe_context *rctx) +void r600_init_state_functions(struct r600_pipe_context *rctx) { rctx->context.create_blend_state = r600_create_blend_state; rctx->context.create_depth_stencil_alpha_state = r600_create_dsa_state; @@ -1279,7 +1279,7 @@ void r600_init_state_functions2(struct r600_pipe_context *rctx) rctx->context.sampler_view_destroy = r600_sampler_view_destroy; } -void r600_init_config2(struct r600_pipe_context *rctx) +void r600_init_config(struct r600_pipe_context *rctx) { int ps_prio; int vs_prio; diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c index 416fcebc9fe..d1cf9e93f8a 100644 --- a/src/gallium/winsys/r600/drm/r600_hw_context.c +++ b/src/gallium/winsys/r600/drm/r600_hw_context.c @@ -40,15 +40,6 @@ #define GROUP_FORCE_NEW_BLOCK 0 -int radeon_bo_map(struct radeon *radeon, struct radeon_bo *bo); -void radeon_bo_unmap(struct radeon *radeon, struct radeon_bo *bo); -void radeon_bo_reference(struct radeon *radeon, - struct radeon_bo **dst, - struct radeon_bo *src); - -unsigned radeon_ws_bo_get_handle(struct radeon_ws_bo *pb_bo); -void radeon_bo_pbmgr_flush_maps(struct pb_manager *_mgr); - int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg, unsigned nreg) { struct r600_block *block; diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h index f836e607c0b..7106bb6bcba 100644 --- a/src/gallium/winsys/r600/drm/r600_priv.h +++ b/src/gallium/winsys/r600/drm/r600_priv.h @@ -89,8 +89,10 @@ void radeon_bo_reference(struct radeon *radeon, struct radeon_bo **dst, struct radeon_bo *src); int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo); int radeon_bo_busy(struct radeon *radeon, struct radeon_bo *bo, uint32_t *domain); +void radeon_bo_pbmgr_flush_maps(struct pb_manager *_mgr); /* radeon_bo_pb.c */ +struct pb_manager *radeon_bo_pbmgr_create(struct radeon *radeon); struct pb_buffer *radeon_bo_pb_create_buffer_from_handle(struct pb_manager *_mgr, uint32_t handle); |