From c005a18a5665bae84f64e97dd4187cd30642f4d0 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 23 Jan 2020 13:01:58 +0100 Subject: [PATCH] v3dv: don't swap RB channels when copying images to buffers We don't need to do this, since we are just copying. Also, we are not swapping on the store, so doing it on the load would be incorrect. This gets the prime blit present path in WSI common to render R/B channels correctly after blitting from the BGRA image to the linear buffer for display output. Part-of: --- src/broadcom/vulkan/v3dv_meta_copy.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c index 390bf2c7818..a7bb1159757 100644 --- a/src/broadcom/vulkan/v3dv_meta_copy.c +++ b/src/broadcom/vulkan/v3dv_meta_copy.c @@ -34,18 +34,13 @@ emit_image_loads(struct v3dv_cl *cl, { uint32_t layer_offset = v3dv_layer_offset(image, mip_level, layer); - const struct util_format_description *desc = - vk_format_description(image->vk_format); - bool swap_rb = desc->swizzle[0] == PIPE_SWIZZLE_Z && - image->vk_format != VK_FORMAT_B5G6R5_UNORM_PACK16; - const struct v3d_resource_slice *slice = &image->slices[mip_level]; cl_emit(cl, LOAD_TILE_BUFFER_GENERAL, load) { load.buffer_to_load = RENDER_TARGET_0; load.address = v3dv_cl_address(image->mem->bo, layer_offset); load.input_image_format = image->format->rt_type; - load.r_b_swap = swap_rb; + load.r_b_swap = false; load.memory_format = slice->tiling; if (slice->tiling == VC5_TILING_UIF_NO_XOR ||