nouveau: Assume all texture blankets are linear for now.

This commit is contained in:
Younes Manton 2009-11-01 18:25:59 -05:00
parent 1f630fa016
commit 87d7c1aa15
3 changed files with 7 additions and 2 deletions

View 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;
}

View 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;
}

View 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;