diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c b/src/gallium/auxiliary/util/u_transfer_helper.c index db580e6f513..1e0f490a7d5 100644 --- a/src/gallium/auxiliary/util/u_transfer_helper.c +++ b/src/gallium/auxiliary/util/u_transfer_helper.c @@ -194,6 +194,7 @@ transfer_map_msaa(struct pipe_context *pctx, if (!trans) return NULL; struct pipe_transfer *ptrans = &trans->base; + bool need_pack = needs_pack(usage); pipe_resource_reference(&ptrans->resource, prsc); ptrans->level = level; @@ -207,6 +208,7 @@ transfer_map_msaa(struct pipe_context *pctx, .height0 = box->height, .depth0 = 1, .array_size = 1, + .usage = need_pack ? PIPE_USAGE_STAGING : 0, }; if (util_format_is_depth_or_stencil(tmpl.format)) tmpl.bind |= PIPE_BIND_DEPTH_STENCIL; @@ -218,7 +220,7 @@ transfer_map_msaa(struct pipe_context *pctx, return NULL; } - if (needs_pack(usage)) { + if (need_pack) { struct pipe_blit_info blit; memset(&blit, 0, sizeof(blit));