Home | History | Annotate | Download | only in nv30

Lines Matching refs:fp

38    struct nv30_fragprog *fp = nv30->fragprog.program;
41 if (unlikely(!fp->buffer))
42 fp->buffer = pipe_buffer_create(pipe->screen, 0, 0, fp->insn_len * 4);
45 pipe_buffer_write(pipe, fp->buffer, 0, fp->insn_len * 4, fp->insn);
52 map = pipe_buffer_map(pipe, fp->buffer,
55 for (i = 0; i < fp->insn_len; i++)
56 *map++ = (fp->insn[i] >> 16) | (fp->insn[i] << 16);
61 if (nv04_resource(fp->buffer)->domain != NOUVEAU_BO_VRAM)
62 nouveau_buffer_migrate(nv, nv04_resource(fp->buffer), NOUVEAU_BO_VRAM);
70 struct nv30_fragprog *fp = nv30->fragprog.program;
74 if (!fp->translated) {
75 _nvfx_fragprog_translate(eng3d->oclass, fp);
76 if (!fp->translated)
82 /* update constants, also needs to be done on every fp switch as we
89 for (i = 0; i < fp->nr_consts; i++) {
90 unsigned off = fp->consts[i].offset;
91 unsigned idx = fp->consts[i].index * 4;
93 if (!memcmp(&fp->insn[off], &cbuf[idx], 4 * 4))
95 memcpy(&fp->insn[off], &cbuf[idx], 4 * 4);
107 if (nv30->state.fragprog != fp || upload) {
108 struct nv04_resource *r = nv04_resource(fp->buffer);
120 PUSH_DATA (push, fp->fp_control);
125 PUSH_DATA (push, fp->texcoords);
131 nv30->state.fragprog = fp;
139 struct nv30_fragprog *fp = CALLOC_STRUCT(nv30_fragprog);
140 if (!fp)
143 fp->pipe.tokens = tgsi_dup_tokens(cso->tokens);
144 tgsi_scan_shader(fp->pipe.tokens, &fp->info);
145 return fp;
151 struct nv30_fragprog *fp = hwcso;
153 pipe_resource_reference(&fp->buffer, NULL);
155 if (fp->draw)
156 draw_delete_fragment_shader(nv30_context(pipe)->draw, fp->draw);
158 FREE((void *)fp->pipe.tokens);
159 FREE(fp->insn);
160 FREE(fp->consts);
161 FREE(fp);
168 struct nv30_fragprog *fp = hwcso;
170 /* reset the bucftx so that we don't keep a dangling reference to the fp
173 if (fp != nv30->state.fragprog)
176 nv30->fragprog.program = fp;