From 728069485da5b4a2a6d42caa381003e530f54c9d Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 17 Dec 2020 12:03:42 +0100 Subject: [PATCH] panfrost: Use PAN_V6_SWIZZLE() in pan_blit.c Suggested-by: Icecream95 Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_blit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/panfrost/lib/pan_blit.c b/src/panfrost/lib/pan_blit.c index 0467dfc8336..e796d95957f 100644 --- a/src/panfrost/lib/pan_blit.c +++ b/src/panfrost/lib/pan_blit.c @@ -325,8 +325,7 @@ midgard_load_emit_texture(struct pan_pool *pool, struct MALI_DRAW *draw, 0, 0, image->nr_samples, 0, - (MALI_CHANNEL_R << 0) | (MALI_CHANNEL_G << 3) | - (MALI_CHANNEL_B << 6) | (MALI_CHANNEL_A << 9), + PAN_V6_SWIZZLE(R, G, B, A), image->bo->ptr.gpu + image->first_layer * panfrost_get_layer_stride(image->slices, image->dim == MALI_TEXTURE_DIMENSION_3D, @@ -502,8 +501,7 @@ bifrost_load_emit_texture(struct pan_pool *pool, struct MALI_DRAW *draw, 0, 0, image->nr_samples, 0, - (MALI_CHANNEL_R << 0) | (MALI_CHANNEL_G << 3) | - (MALI_CHANNEL_B << 6) | (MALI_CHANNEL_A << 9), + PAN_V6_SWIZZLE(R, G, B, A), image->bo->ptr.gpu + image->first_layer * panfrost_get_layer_stride(image->slices, image->dim == MALI_TEXTURE_DIMENSION_3D,