summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-06-03 10:24:30 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-06-03 10:25:53 +1000
commit00fae87f96e1fc5198311feec81866bf9c53d0e1 (patch)
tree07ac9937bc639f7430309aeeb06bed748e675e09 /libdrm
parentdbffeadcfca7cb4e3905ec0b8573d10e0418295e (diff)
nouveau: fill in bo->tiled field for referenced buffers
Fixes the dri1 gallium driver if the front buffer happens to be non-linear.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/nouveau/nouveau_bo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libdrm/nouveau/nouveau_bo.c b/libdrm/nouveau/nouveau_bo.c
index 1bf6612f..8832a0d2 100644
--- a/libdrm/nouveau/nouveau_bo.c
+++ b/libdrm/nouveau/nouveau_bo.c
@@ -49,6 +49,15 @@ nouveau_bo_info(struct nouveau_bo_priv *nvbo, struct drm_nouveau_gem_info *arg)
nvbo->size = nvbo->base.size = arg->size;
nvbo->offset = arg->offset;
nvbo->map_handle = arg->map_handle;
+
+ if (nvbo->domain & NOUVEAU_GEM_DOMAIN_TILE) {
+ nvbo->base.tiled = 1;
+ if (nvbo->domain & NOUVEAU_GEM_DOMAIN_TILE_ZETA)
+ nvbo->base.tiled |= 2;
+ } else {
+ nvbo->base.tiled = 0;
+ }
+
return 0;
}