From 208f5bf3cd8555f5b896c3e9d60c26f1bdb8683c Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Tue, 23 Mar 2010 16:34:51 +0100 Subject: nvfx: delay allocation of buffers in GART/VRAM to validation time Currently we allocate buffers in GART or VRAM at creation time. However, when using swtnl, this results in reads from uncached memory, which drastically impair performance. So, for now, cause nouveau_screen.c to not pass any placement flags to buffer creation, so that the buffers are moved later. Previously libdrm itself did this, but was changed to not to do it. This may introduce an extra copy in normal usage, but this currently does not seem to introduce significant performance degradation. This will be revisited when pipebuffer is integrated. Note that for AGP systems, properly solving this may be complex since currently there is no fast way of reading from GART/VRAM. We will probably need to try mapping AGP as writethrough and, in addition, make buffer creation more aware of future buffer usage. --- src/gallium/drivers/nvfx/nvfx_vbo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 257087f8f6..db47acb950 100644 --- a/src/gallium/drivers/nvfx/nvfx_vbo.c +++ b/src/gallium/drivers/nvfx/nvfx_vbo.c @@ -495,7 +495,7 @@ nvfx_vbo_validate(struct nvfx_context *nvfx) struct nouveau_grobj *eng3d = nvfx->screen->eng3d; struct pipe_buffer *ib = nvfx->idxbuf; unsigned ib_format = nvfx->idxbuf_format; - unsigned vb_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD; + unsigned vb_flags = NOUVEAU_BO_GART | NOUVEAU_BO_RD; int hw; vtxbuf = so_new(3, 17, 18); -- cgit v1.2.3