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;
}
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;
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;
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++) {
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 ||
/* 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;
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;
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;
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;
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:
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:
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));
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;
}
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);
};
/* 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,
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,
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;
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];
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;
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;
}
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;
/* 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++) {
}
}
-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;
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;
}
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;
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;
#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;
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);