Home | History | Annotate | Download | only in nv30

Lines Matching refs:vp

35 nv30_vertprog_destroy(struct nv30_vertprog *vp)
37 util_dynarray_fini(&vp->branch_relocs);
38 nouveau_heap_free(&vp->exec);
39 FREE(vp->insns);
40 vp->insns = NULL;
41 vp->nr_insns = 0;
43 util_dynarray_fini(&vp->const_relocs);
44 nouveau_heap_free(&vp->data);
45 FREE(vp->consts);
46 vp->consts = NULL;
47 vp->nr_consts = 0;
49 vp->translated = FALSE;
57 struct nv30_vertprog *vp = nv30->vertprog.program;
64 if (memcmp(vp->texcoord, fp->texcoord, sizeof(vp->texcoord))) {
65 if (vp->translated)
66 nv30_vertprog_destroy(vp);
67 memcpy(vp->texcoord, fp->texcoord, sizeof(vp->texcoord));
71 if (nv30->rast && nv30->rast->pipe.clip_plane_enable != vp->enabled_ucps) {
72 vp->enabled_ucps = nv30->rast->pipe.clip_plane_enable;
73 if (vp->translated)
74 nv30_vertprog_destroy(vp);
77 if (!vp->translated) {
78 vp->translated = _nvfx_vertprog_translate(nv30, vp);
79 if (!vp->translated) {
86 if (!vp->exec) {
88 struct nv30_shader_reloc *reloc = vp->branch_relocs.data;
89 unsigned nr_reloc = vp->branch_relocs.size / sizeof(*reloc);
92 if (nouveau_heap_alloc(heap, vp->nr_insns, &vp->exec, &vp->exec)) {
93 while (heap->next && heap->size < vp->nr_insns) {
98 if (nouveau_heap_alloc(heap, vp->nr_insns, &vp->exec, &vp->exec)) {
106 inst = vp->insns[reloc->location].data;
107 target = vp->exec->start + reloc->target;
115 inst = vp->insns[reloc->location].data;
116 target = vp->exec->start + reloc->target;
129 if (vp->nr_consts && !vp->data) {
131 struct nv30_shader_reloc *reloc = vp->const_relocs.data;
132 unsigned nr_reloc = vp->const_relocs.size / sizeof(*reloc);
135 if (nouveau_heap_alloc(heap, vp->nr_consts, vp, &vp->data)) {
136 while (heap->next && heap->size < vp->nr_consts) {
141 if (nouveau_heap_alloc(heap, vp->nr_consts, vp, &vp->data)) {
149 inst = vp->insns[reloc->location].data;
150 target = vp->data->start + reloc->target;
158 inst = vp->insns[reloc->location].data;
159 target = vp->data->start + reloc->target;
171 if (vp->nr_consts) {
174 for (i = 0; i < vp->nr_consts; i++) {
175 struct nv30_vertprog_data *data = &vp->consts[i];
189 PUSH_DATA (push, vp->data->start + i);
196 PUSH_DATA (push, vp->exec->start);
197 for (i = 0; i < vp->nr_insns; i++) {
199 PUSH_DATAp(push, vp->insns[i].data, 4);
205 PUSH_DATA (push, vp->exec->start);
208 PUSH_DATA (push, 0x00000013); /* vp instead of ff, somehow */
211 PUSH_DATA (push, vp->ir);
212 PUSH_DATA (push, vp->or | fp->vp_or);
223 struct nv30_vertprog *vp = CALLOC_STRUCT(nv30_vertprog);
224 if (!vp)
227 vp->pipe.tokens = tgsi_dup_tokens(cso->tokens);
228 tgsi_scan_shader(vp->pipe.tokens, &vp->info);
229 return vp;
235 struct nv30_vertprog *vp = hwcso;
237 if (vp->translated)
238 nv30_vertprog_destroy(vp);
239 FREE((void *)vp->pipe.tokens);
240 FREE(vp);