Mesa (master): nv50: fix dri3 prime buffer creation
Dave Airlie
airlied at kemper.freedesktop.org
Fri Jun 27 03:38:56 UTC 2014
Module: Mesa
Branch: master
Commit: c58486516f2ec8341f92554e28fd84c10d835a45
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c58486516f2ec8341f92554e28fd84c10d835a45
Author: Axel Davy <axel.davy at ens.fr>
Date: Thu Jun 26 20:53:43 2014 -0400
nv50: fix dri3 prime buffer creation
This is the same fix than
"nvc0: fix dri3 prime buffer creation"
Signed-off-by: Axel Davy <axel.davy at ens.fr>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/drivers/nouveau/nv50/nv50_miptree.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
index 4c55179..14e5a0d 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
@@ -352,7 +352,12 @@ nv50_miptree_create(struct pipe_screen *pscreen,
}
bo_config.nv50.tile_mode = mt->level[0].tile_mode;
- bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_NOSNOOP;
+ if (!bo_config.nv50.memtype && (pt->bind & PIPE_BIND_SHARED))
+ mt->base.domain = NOUVEAU_BO_GART;
+ else
+ mt->base.domain = NOUVEAU_BO_VRAM;
+
+ bo_flags = mt->base.domain | NOUVEAU_BO_NOSNOOP;
if (mt->base.base.bind & (PIPE_BIND_CURSOR | PIPE_BIND_DISPLAY_TARGET))
bo_flags |= NOUVEAU_BO_CONTIG;
@@ -362,7 +367,6 @@ nv50_miptree_create(struct pipe_screen *pscreen,
FREE(mt);
return NULL;
}
- mt->base.domain = NOUVEAU_BO_VRAM;
mt->base.address = mt->base.bo->offset;
return pt;
More information about the mesa-commit
mailing list