summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_vbo.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-01-11 03:13:42 +0100
committerLuca Barbieri <[email protected]>2010-03-23 18:11:25 +0100
commit3428a305150e98c8002e0fb339f5667c5533c0d1 (patch)
tree5e6a12ce0310de019ac08fb56926ff3285b33fa4 /src/gallium/drivers/nvfx/nvfx_vbo.c
parent208f5bf3cd8555f5b896c3e9d60c26f1bdb8683c (diff)
nvfx: add NOUVEAU_VTXIDX_IN_VRAM variable to put vertex/index buffers in VRAM
On some systems, putting vertex and index buffers in VRAM instead of GART memory eliminates massive graphics corruption which is otherwise present, due to unclear causes. This patch adds an environment variable that does that, along with helpful messages. It turns it on by default on G7x, as it is what I am seeing corruption on and some other reports also seemed to pinpoint these cards.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_vbo.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
index db47acb9502..c26536b0e77 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_GART | NOUVEAU_BO_RD;
+ unsigned vb_flags = nvfx->screen->vertex_buffer_flags | NOUVEAU_BO_RD;
int hw;
vtxbuf = so_new(3, 17, 18);