void nvc0_vertprog_validate(struct nvc0_context *nvc0) { struct nouveau_channel *chan = nvc0->screen->base.channel; struct nvc0_program *vp = nvc0->vertprog; if (nvc0->clip.nr > vp->vp.num_ucps) { assert(nvc0->clip.nr <= 6); vp->vp.num_ucps = 6; if (vp->translated) nvc0_program_destroy(nvc0, vp); } if (!nvc0_program_validate(nvc0, vp)) return; nvc0_program_update_context_state(nvc0, vp, 0); BEGIN_RING(chan, RING_3D(SP_SELECT(1)), 2); OUT_RING (chan, 0x11); OUT_RING (chan, vp->code_base); BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(1)), 1); OUT_RING (chan, vp->max_gpr); if (!nvc0->gmtyprog && !nvc0->tevlprog) nvc0_program_validate_clip(nvc0, vp); // BEGIN_RING(chan, RING_3D_(0x163c), 1); // OUT_RING (chan, 0); }
static void nvc0_sp_state_delete(struct pipe_context *pipe, void *hwcso) { struct nvc0_program *prog = (struct nvc0_program *)hwcso; nvc0_program_destroy(nvc0_context(pipe), prog); FREE((void *)prog->pipe.tokens); FREE(prog); }