From c58486516f2ec8341f92554e28fd84c10d835a45 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Thu, 26 Jun 2014 20:53:43 -0400 Subject: nv50: fix dri3 prime buffer creation This is the same fix than "nvc0: fix dri3 prime buffer creation" Signed-off-by: Axel Davy Reviewed-by: Ilia Mirkin Signed-off-by: Dave Airlie --- src/gallium/drivers/nouveau/nv50/nv50_miptree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c index 4c5517978c0..14e5a0da077 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; -- cgit v1.2.3