summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorMarcin Slusarz <[email protected]>2011-05-06 19:06:20 +0200
committerChristoph Bumiller <[email protected]>2011-05-06 19:09:23 +0200
commit3b2bc4ac5b63429738687fd296180149b54e67a4 (patch)
treee438d2ecb78723480182a77835a5a43d132e1da2 /src/gallium/drivers/nv50
parent8c3226be9004657db6c850b3164caf70deafa822 (diff)
gallium/xorg st/nv50: add PIPE_BIND_CURSOR
We need to distinguish surfaces for mouse cursors from scanouts, because nv50 hardware display engine ignores tiling flags.
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index 9eeca05ada3..486b368ae98 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -158,6 +158,9 @@ nv50_miptree_create(struct pipe_screen *pscreen,
tile_flags = 0x6000;
break;
default:
+ if (pt->bind & PIPE_BIND_CURSOR)
+ tile_flags = 0;
+ else
if ((pt->bind & PIPE_BIND_SCANOUT) &&
util_format_get_blocksizebits(pt->format) == 32)
tile_flags = 0x7a00;
@@ -165,6 +168,8 @@ nv50_miptree_create(struct pipe_screen *pscreen,
tile_flags = 0x7000;
break;
}
+ if (pt->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_CURSOR))
+ tile_flags |= NOUVEAU_BO_TILE_SCANOUT;
/* For 3D textures, a mipmap is spanned by all the layers, for array
* textures and cube maps, each layer contains its own mipmaps.
@@ -176,7 +181,10 @@ nv50_miptree_create(struct pipe_screen *pscreen,
unsigned blocksize = util_format_get_blocksize(pt->format);
lvl->offset = mt->total_size;
- lvl->tile_mode = get_tile_dims(nbx, nby, d);
+
+ if (tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK)
+ lvl->tile_mode = get_tile_dims(nbx, nby, d);
+
lvl->pitch = align(nbx * blocksize, NV50_TILE_PITCH(lvl->tile_mode));
mt->total_size += lvl->pitch *