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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-01-23 13:01:58 +01:00 committed by Marge Bot
parent 9a72a79d1c
commit c005a18a56
1 changed files with 1 additions and 6 deletions

View File

@ -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 ||