summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/nv40/nv40_fragtex.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-02-03 12:08:31 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-02-03 12:08:49 +1100
commitf87a8cace2ce946d969eb6d93def2d65cb541bda (patch)
tree732d3271d86cddc510bef8b5c181fce1a5f0b8a3 /src/mesa/pipe/nv40/nv40_fragtex.c
parentedbeec2b9177fef27b5a04b7b9b975b8abf84367 (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.c8
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? */);