diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-02-03 12:08:31 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-02-15 13:50:29 +1100 |
commit | 705022f98c32c44b94411ea13dfe4cbc899f5a77 (patch) | |
tree | de1031e64b702e63faf0099c03bb520b3c5b00e0 /src/mesa/pipe/nv40/nv40_fragtex.c | |
parent | 8bbedc3f4b7b281a60286ba573077a6e3e659f63 (diff) |
nouveau: avoid relocations where possible.
Potential relocations are emitted as NOPs where they're needed. In the
event a buffer moves, the pushbuf code will emit the relevant state
changes into the NOPs.
Just a start, more work is needed to get this looking how I want it to.
Diffstat (limited to 'src/mesa/pipe/nv40/nv40_fragtex.c')
-rw-r--r-- | src/mesa/pipe/nv40/nv40_fragtex.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/pipe/nv40/nv40_fragtex.c b/src/mesa/pipe/nv40/nv40_fragtex.c index 48d6eb629f..7c5ecd5c56 100644 --- a/src/mesa/pipe/nv40/nv40_fragtex.c +++ b/src/mesa/pipe/nv40/nv40_fragtex.c @@ -104,7 +104,13 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit) nv40->tex[unit].buffer = nv40mt->buffer; nv40->tex[unit].format = txf; - BEGIN_RING(curie, NV40TCL_TEX_WRAP(unit), 6); + BEGIN_RING(curie, NV40TCL_TEX_OFFSET(unit), 8); + OUT_RELOCl(nv40->tex[unit].buffer, 0, NOUVEAU_BO_VRAM | + NOUVEAU_BO_GART | NOUVEAU_BO_RD); + OUT_RELOCd(nv40->tex[unit].buffer, nv40->tex[unit].format, + NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD | + NOUVEAU_BO_OR, NV40TCL_TEX_FORMAT_DMA0, + NV40TCL_TEX_FORMAT_DMA1); OUT_RING (ps->wrap); OUT_RING (NV40TCL_TEX_ENABLE_ENABLE | ps->en | (0x00078000) /* mipmap related? */); |