void fd3_prog_init(struct pipe_context *pctx) { pctx->create_fs_state = fd3_fp_state_create; pctx->delete_fs_state = fd3_fp_state_delete; pctx->create_vs_state = fd3_vp_state_create; pctx->delete_vs_state = fd3_vp_state_delete; fd_prog_init(pctx); }
void fd4_prog_init(struct pipe_context *pctx) { pctx->create_fs_state = fd4_fp_state_create; pctx->delete_fs_state = fd4_fp_state_delete; pctx->create_vs_state = fd4_vp_state_create; pctx->delete_vs_state = fd4_vp_state_delete; fd_prog_init(pctx); fix_blit_fp(pctx); }
struct pipe_context * fd_context_create(struct pipe_screen *pscreen, void *priv) { struct fd_screen *screen = fd_screen(pscreen); struct fd_context *ctx = CALLOC_STRUCT(fd_context); struct pipe_context *pctx; if (!ctx) return NULL; DBG(""); ctx->screen = screen; ctx->ring = fd_ringbuffer_new(screen->pipe, 0x100000); ctx->draw_start = fd_ringmarker_new(ctx->ring); ctx->draw_end = fd_ringmarker_new(ctx->ring); pctx = &ctx->base; pctx->screen = pscreen; pctx->priv = priv; pctx->flush = fd_context_flush; pctx->destroy = fd_context_destroy; util_slab_create(&ctx->transfer_pool, sizeof(struct pipe_transfer), 16, UTIL_SLAB_SINGLETHREADED); fd_vbo_init(pctx); fd_blend_init(pctx); fd_rasterizer_init(pctx); fd_zsa_init(pctx); fd_state_init(pctx); fd_resource_context_init(pctx); fd_clear_init(pctx); fd_prog_init(pctx); fd_texture_init(pctx); ctx->blitter = util_blitter_create(pctx); if (!ctx->blitter) { fd_context_destroy(pctx); return NULL; } /* construct vertex state used for solid ops (clear, and gmem<->mem) */ ctx->solid_vertexbuf = create_solid_vertexbuf(pctx); fd_state_emit_setup(pctx); return pctx; }
void fd2_prog_init(struct pipe_context *pctx) { struct fd_context *ctx = fd_context(pctx); pctx->create_fs_state = fd2_fp_state_create; pctx->delete_fs_state = fd2_fp_state_delete; pctx->create_vs_state = fd2_vp_state_create; pctx->delete_vs_state = fd2_vp_state_delete; fd_prog_init(pctx); ctx->solid_prog.fp = create_solid_fp(); ctx->solid_prog.vp = create_solid_vp(); ctx->blit_prog.fp = create_blit_fp(); ctx->blit_prog.vp = create_blit_vp(); }