ti->p->fixups = pc->fixups;
ti->p->num_fixups = pc->num_fixups;
+ ti->p->uses_lmem = ti->store_to_memory;
+
NV50_DBGMSG("SHADER TRANSLATION - %s\n", ret ? "failure" : "success");
out:
OUT_RELOC (chan, screen->constbuf_parm[i],
((NV50_CB_PVP + i) << 16) | 0x0000, rl, 0, 0);
}
+
+ BGN_RELOC (chan, screen->stack_bo,
+ tesla, NV50TCL_STACK_ADDRESS_HIGH, 2, rl);
+ OUT_RELOCh(chan, screen->stack_bo, 0, rl);
+ OUT_RELOCl(chan, screen->stack_bo, 0, rl);
+
+ if (!screen->cur_ctx->req_lmem)
+ return;
+
+ BGN_RELOC (chan, screen->local_bo,
+ tesla, NV50TCL_LOCAL_ADDRESS_HIGH, 2, rl);
+ OUT_RELOCh(chan, screen->local_bo, 0, rl);
+ OUT_RELOCl(chan, screen->local_bo, 0, rl);
}
#ifndef NOUVEAU_GETPARAM_GRAPH_UNITS
return p->translated;
}
+static INLINE void
+nv50_program_validate_common(struct nv50_context *nv50, struct nv50_program *p)
+{
+ nv50_program_validate_code(nv50, p);
+
+ if (p->uses_lmem)
+ nv50->req_lmem |= 1 << p->type;
+ else
+ nv50->req_lmem &= ~(1 << p->type);
+}
+
struct nouveau_stateobj *
nv50_vertprog_validate(struct nv50_context *nv50)
{
if (!(nv50->dirty & NV50_NEW_VERTPROG))
return NULL;
- nv50_program_validate_code(nv50, p);
+ nv50_program_validate_common(nv50, p);
so_ref(p->so, &so);
return so;
if (!(nv50->dirty & NV50_NEW_FRAGPROG))
return NULL;
- nv50_program_validate_code(nv50, p);
+ nv50_program_validate_common(nv50, p);
so_ref(p->so, &so);
return so;
if (!(nv50->dirty & NV50_NEW_GEOMPROG))
return NULL;
- nv50_program_validate_code(nv50, p);
+ nv50_program_validate_common(nv50, p);
so_ref(p->so, &so);
return so;