panfrost: Don't double-compose swizzles

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: b9a136cdd1 ("panfrost: Implement BGRA textures")
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7352>
This commit is contained in:
Alyssa Rosenzweig 2020-10-27 14:21:44 -04:00 committed by Marge Bot
parent a575bb1369
commit 1b48b9e619

View file

@ -1015,9 +1015,6 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
panfrost_translate_texture_dimension(so->base.target);
if (device->quirks & IS_BIFROST) {
unsigned char composed_swizzle[4];
util_format_compose_swizzles(desc->swizzle, user_swizzle, composed_swizzle);
unsigned size = panfrost_estimate_texture_payload_size(
so->base.u.tex.first_level,
so->base.u.tex.last_level,
@ -1041,7 +1038,7 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
so->base.u.tex.last_layer,
texture->nr_samples,
prsrc->cubemap_stride,
panfrost_translate_swizzle_4(composed_swizzle),
panfrost_translate_swizzle_4(user_swizzle),
prsrc->bo->ptr.gpu,
prsrc->slices, &so->bo->ptr);
} else {