void fd_prog_init(struct pipe_context *pctx)
{
	struct fd_context *ctx = fd_context(pctx);
	int i;

	pctx->bind_fs_state = fd_fp_state_bind;
	pctx->bind_vs_state = fd_vp_state_bind;

	// XXX for now, let a2xx keep it's own hand-rolled shaders
	// for solid and blit progs:
	if (ctx->screen->gpu_id < 300)
		return;

	ctx->solid_prog.fp = assemble_tgsi(pctx, solid_fp, true);
	ctx->solid_prog.vp = assemble_tgsi(pctx, solid_vp, false);
	ctx->blit_prog[0].vp = assemble_tgsi(pctx, blit_vp, false);
	ctx->blit_prog[0].fp = fd_prog_blit(pctx, 1, false);
	for (i = 1; i < ctx->screen->max_rts; i++) {
		ctx->blit_prog[i].vp = ctx->blit_prog[0].vp;
		ctx->blit_prog[i].fp = fd_prog_blit(pctx, i + 1, false);
	}

	ctx->blit_z.vp = ctx->blit_prog[0].vp;
	ctx->blit_z.fp = fd_prog_blit(pctx, 0, true);
	ctx->blit_zs.vp = ctx->blit_prog[0].vp;
	ctx->blit_zs.fp = fd_prog_blit(pctx, 1, true);
}
示例#2
0
void fd_prog_init(struct pipe_context *pctx)
{
	struct fd_context *ctx = fd_context(pctx);

	pctx->bind_fs_state = fd_fp_state_bind;
	pctx->bind_vs_state = fd_vp_state_bind;

	// XXX for now, let a2xx keep it's own hand-rolled shaders
	// for solid and blit progs:
	if (ctx->screen->gpu_id < 300)
		return;

	ctx->solid_prog.fp = assemble_tgsi(pctx, solid_fp, true);
	ctx->solid_prog.vp = assemble_tgsi(pctx, solid_vp, false);
	ctx->blit_prog.fp = assemble_tgsi(pctx, blit_fp, true);
	ctx->blit_prog.vp = assemble_tgsi(pctx, blit_vp, false);
}