nouveau: switch to nouveau_bo_new_tile()

This commit is contained in:
Ben Skeggs 2010-02-12 12:50:24 +10:00
parent 04d35714a6
commit 6af75a0ff4
1 changed files with 6 additions and 4 deletions

View File

@ -55,7 +55,7 @@ nouveau_screen_bo_new(struct pipe_screen *pscreen, unsigned alignment,
{
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
struct nouveau_bo *bo = NULL;
uint32_t flags = NOUVEAU_BO_MAP;
uint32_t flags = NOUVEAU_BO_MAP, tile_mode = 0, tile_flags = 0;
int ret;
if (usage & NOUVEAU_BUFFER_USAGE_TRANSFER)
@ -77,13 +77,15 @@ nouveau_screen_bo_new(struct pipe_screen *pscreen, unsigned alignment,
flags |= NOUVEAU_BO_VRAM;
if (dev->chipset == 0x50 || dev->chipset >= 0x80) {
flags |= NOUVEAU_BO_TILED;
if (usage & NOUVEAU_BUFFER_USAGE_ZETA)
flags |= NOUVEAU_BO_ZTILE;
tile_flags = 0x2800;
else
tile_flags = 0x7000;
}
}
ret = nouveau_bo_new(dev, flags, alignment, size, &bo);
ret = nouveau_bo_new_tile(dev, flags, alignment, size,
tile_mode, tile_flags, &bo);
if (ret)
return NULL;