summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_vbo.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-23 16:43:04 +0200
committerLuca Barbieri <[email protected]>2010-08-23 17:12:31 +0200
commitc907b947130c884de09e48e1ecbeecc9afc9f75b (patch)
treee1b394b9114b33673353458faaba8f790f8271f7 /src/gallium/drivers/nvfx/nvfx_vbo.c
parentea709696185846c876581e1c41a21921826823ec (diff)
nvfx: emit bo relocations only when needed
Should improve performance, possibly significantly.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_vbo.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
index 21d6e0e6f84..e6e9a8f2e40 100644
--- a/src/gallium/drivers/nvfx/nvfx_vbo.c
+++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
@@ -334,6 +334,7 @@ nvfx_vbo_validate(struct nvfx_context *nvfx)
OUT_RING(chan, 0);
nvfx->hw_vtxelt_nr = nvfx->vtxelt->num_elements;
+ nvfx->relocs_needed &=~ NVFX_RELOCATE_VTXBUF;
return TRUE;
}
@@ -362,6 +363,7 @@ nvfx_vbo_relocate(struct nvfx_context *nvfx)
vb_flags | NOUVEAU_BO_LOW | NOUVEAU_BO_OR,
0, NV34TCL_VTXBUF_ADDRESS_DMA1);
}
+ nvfx->relocs_needed &=~ NVFX_RELOCATE_VTXBUF;
}
static void
@@ -382,6 +384,7 @@ nvfx_idxbuf_emit(struct nvfx_context* nvfx, unsigned ib_flags)
OUT_RELOC(chan, bo, nvfx->idxbuf.offset + 1, ib_flags | NOUVEAU_BO_LOW, 0, 0);
OUT_RELOC(chan, bo, ib_format, ib_flags | NOUVEAU_BO_OR,
0, NV34TCL_IDXBUF_FORMAT_DMA1);
+ nvfx->relocs_needed &=~ NVFX_RELOCATE_IDXBUF;
}
void