summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_miptree.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-05-07 14:11:40 +0200
committerChristian König <[email protected]>2011-05-07 14:11:40 +0200
commit213b9004a6ee033a16af3dcd187aa68b56c39858 (patch)
treef577f4dc276f70dad63f102f69f87f4d566186ef /src/gallium/drivers/nv50/nv50_miptree.c
parent6ad846ee78d9d8ba93dcecdefbf89f2b981333ef (diff)
parent03615c02d81437cf546609fc6a39c6c73be39360 (diff)
Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts: src/gallium/drivers/r600/r600_state.c
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_miptree.c')
-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 *