return r600_context_add_block(ctx, r600_loop_consts, nreg, PKT3_SET_LOOP_CONST, EVERGREEN_LOOP_CONST_OFFSET);
}
-int evergreen_context_init(struct r600_context *ctx, struct r600_screen *screen)
+int evergreen_context_init(struct r600_context *ctx)
{
int r;
- ctx->screen = screen;
- ctx->ws = screen->ws;
-
LIST_INITHEAD(&ctx->active_query_list);
/* init dirty list */
if (r)
goto out_err;
- ctx->cs = screen->ws->cs_create(screen->ws);
+ ctx->cs = ctx->ws->cs_create(ctx->ws);
/* allocate cs variables */
ctx->bo = calloc(RADEON_MAX_CMDBUF_DWORDS, sizeof(void *));
struct r600_screen;
void r600_get_backend_mask(struct r600_context *ctx);
-int r600_context_init(struct r600_context *ctx, struct r600_screen *screen);
+int r600_context_init(struct r600_context *ctx);
void r600_context_fini(struct r600_context *ctx);
void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_state *state);
void r600_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid);
void r600_context_streamout_end(struct r600_context *ctx);
void r600_context_draw_opaque_count(struct r600_context *ctx, struct r600_so_target *t);
-int evergreen_context_init(struct r600_context *ctx, struct r600_screen *screen);
+int evergreen_context_init(struct r600_context *ctx);
void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *draw);
void evergreen_context_flush_dest_caches(struct r600_context *ctx);
void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid);
return 0;
}
-int r600_context_init(struct r600_context *ctx, struct r600_screen *screen)
+int r600_context_init(struct r600_context *ctx)
{
int r;
- ctx->screen = screen;
- ctx->ws = screen->ws;
-
LIST_INITHEAD(&ctx->active_query_list);
/* init dirty list */
if (r)
goto out_err;
- ctx->cs = screen->ws->cs_create(screen->ws);
+ ctx->cs = ctx->ws->cs_create(ctx->ws);
/* allocate cs variables */
ctx->bo = calloc(RADEON_MAX_CMDBUF_DWORDS, sizeof(void *));
case R600:
case R700:
r600_init_state_functions(rctx);
- if (r600_context_init(rctx, rctx->screen)) {
+ if (r600_context_init(rctx)) {
r600_destroy_context(&rctx->context);
return NULL;
}
case EVERGREEN:
case CAYMAN:
evergreen_init_state_functions(rctx);
- if (evergreen_context_init(rctx, rctx->screen)) {
+ if (evergreen_context_init(rctx)) {
r600_destroy_context(&rctx->context);
return NULL;
}