* FUCK! watch dst==src vectors, can overwrite components that are needed.
* ie. SUB R0, R0.yzxw, R0
*
- * NV50_PROG* -> PIPE_SHADER*
+ * Things to check with renouveau:
+ * SGE/SLT with needed src0/1 swap
+ * FP attr/result assignment - how?
+ * FP/VP constbuf usage
*/
struct nv50_reg {
enum {
if (src->type == P_IMMD) {
inst[1] |= (NV50_CB_PMISC << 22);
} else {
- if (pc->p->type == NV50_PROG_VERTEX)
+ if (pc->p->type == PIPE_SHADER_VERTEX)
inst[1] |= (NV50_CB_PVP << 22);
else
inst[1] |= (NV50_CB_PFP << 22);
if (!pc->attr)
goto out_err;
- if (pc->p->type == NV50_PROG_FRAGMENT) {
+ if (pc->p->type == PIPE_SHADER_FRAGMENT) {
iv = alloc_temp(pc, NULL);
aid++;
}
struct nv50_reg *a = &pc->attr[i*4];
for (c = 0; c < 4; c++) {
- if (pc->p->type == NV50_PROG_FRAGMENT) {
+ if (pc->p->type == PIPE_SHADER_FRAGMENT) {
struct nv50_reg *at =
alloc_temp(pc, NULL);
pc->attr[i*4+c].type = at->type;
}
}
- if (pc->p->type != NV50_PROG_FRAGMENT)
+ if (pc->p->type != PIPE_SHADER_FRAGMENT)
continue;
emit_interp(pc, iv, iv, iv, FALSE);
for (i = 0; i < pc->result_nr; i++) {
for (c = 0; c < 4; c++) {
- if (pc->p->type == NV50_PROG_FRAGMENT) {
+ if (pc->p->type == PIPE_SHADER_FRAGMENT) {
pc->result[i*4+c].type = P_TEMP;
pc->result[i*4+c].hw = -1;
} else {
}
}
- if (p->type == NV50_PROG_FRAGMENT) {
+ if (p->type == PIPE_SHADER_FRAGMENT) {
struct nv50_reg out;
out.type = P_TEMP;
* NOT immd - otherwise it's fucked fucked fucked */
p->insns[p->insns_nr - 1] |= 0x00000001;
- if (p->type == NV50_PROG_VERTEX) {
+ if (p->type == PIPE_SHADER_VERTEX) {
for (i = 0; i < p->insns_nr; i++)
NOUVEAU_ERR("VP0x%08x\n", p->insns[i]);
} else {
struct nv50_program *p = CALLOC_STRUCT(nv50_program);
p->pipe = *cso;
- p->type = NV50_PROG_VERTEX;
+ p->type = PIPE_SHADER_VERTEX;
tgsi_scan_shader(p->pipe.tokens, &p->info);
return (void *)p;
}
struct nv50_program *p = CALLOC_STRUCT(nv50_program);
p->pipe = *cso;
- p->type = NV50_PROG_FRAGMENT;
+ p->type = PIPE_SHADER_FRAGMENT;
tgsi_scan_shader(p->pipe.tokens, &p->info);
return (void *)p;
}