diff options
Diffstat (limited to 'src/mesa/state_tracker/st_mipmap_tree.c')
-rw-r--r-- | src/mesa/state_tracker/st_mipmap_tree.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_mipmap_tree.c b/src/mesa/state_tracker/st_mipmap_tree.c index ac74335ba1..3cbe697ab3 100644 --- a/src/mesa/state_tracker/st_mipmap_tree.c +++ b/src/mesa/state_tracker/st_mipmap_tree.c @@ -62,6 +62,7 @@ st_miptree_create(struct pipe_context *pipe, { GLboolean ok; struct pipe_mipmap_tree *mt = calloc(sizeof(*mt), 1); + GLbitfield flags = 0x0; DBG("%s target %s format %s level %d..%d\n", __FUNCTION__, _mesa_lookup_enum_by_nr(target), @@ -79,9 +80,11 @@ st_miptree_create(struct pipe_context *pipe, mt->refcount = 1; ok = pipe->mipmap_tree_layout(pipe, mt); - if (ok) - mt->region = pipe->region_alloc(pipe, - mt->cpp, mt->pitch, mt->total_height); + if (ok) { + /* note: it's OK to pass 'pitch' as 'width' here: */ + mt->region = pipe->region_alloc(pipe, mt->cpp, mt->pitch, + mt->total_height, flags); + } if (!mt->region) { free(mt); |