nouveau: Assume all texture blankets are linear for now.
authorYounes Manton <younes.m@gmail.com>
Sun, 1 Nov 2009 23:25:59 +0000 (18:25 -0500)
committerYounes Manton <younes.m@gmail.com>
Sun, 1 Nov 2009 23:27:47 +0000 (18:27 -0500)
src/gallium/drivers/nv30/nv30_miptree.c
src/gallium/drivers/nv40/nv40_miptree.c
src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c

index 17acca61abe063657da9245f8c1452a52c6dcca7..280696d45039724faa5d80bf78f067b0824c79a6 100644 (file)
@@ -147,6 +147,9 @@ nv30_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
        mt->level[0].pitch = stride[0];
        mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
 
+       /* Assume whoever created this buffer expects it to be linear for now */
+       mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
+
        pipe_buffer_reference(&mt->buffer, pb);
        return &mt->base;
 }
index 5a201ccf458041c1d0fc56d56ed0d19c0716f81b..465dd3b069399e8b1e0a2d31842bbd5b4d57ce38 100644 (file)
@@ -141,6 +141,9 @@ nv40_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
        mt->level[0].pitch = stride[0];
        mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
 
+       /* Assume whoever created this buffer expects it to be linear for now */
+       mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
+
        pipe_buffer_reference(&mt->buffer, pb);
        return &mt->base;
 }
index f512c0e5f328dba0e802bd4c4c97e579c6c45ada..317dc44d22f805b3f0a0e9136034374b4207ed1b 100644 (file)
@@ -21,8 +21,7 @@ dri_surface_from_handle(struct drm_api *api, struct pipe_screen *pscreen,
        struct pipe_texture tmpl;
 
        memset(&tmpl, 0, sizeof(tmpl));
-       tmpl.tex_usage = PIPE_TEXTURE_USAGE_PRIMARY |
-                        NOUVEAU_TEXTURE_USAGE_LINEAR;
+       tmpl.tex_usage = PIPE_TEXTURE_USAGE_PRIMARY;
        tmpl.target = PIPE_TEXTURE_2D;
        tmpl.last_level = 0;
        tmpl.depth[0] = 1;