From c907b947130c884de09e48e1ecbeecc9afc9f75b Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Mon, 23 Aug 2010 16:43:04 +0200 Subject: nvfx: emit bo relocations only when needed Should improve performance, possibly significantly. --- src/gallium/drivers/nvfx/nvfx_vbo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/nvfx/nvfx_vbo.c') 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 -- cgit v1.2.3