Module: Mesa Branch: master Commit: d8cabe0cbe2d8eb2a2d0abc6cff6717544384d03 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8cabe0cbe2d8eb2a2d0abc6cff6717544384d03
Author: Iago Toral Quiroga <[email protected]> Date: Thu Oct 22 10:48:22 2020 +0200 v3dv: compute swap_rb flag after applying all swizzles We were computing this too early based on the view's format alone which is not correct, since we need to consider the view's swizzle as well. Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271> --- src/broadcom/vulkan/v3dv_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/broadcom/vulkan/v3dv_image.c b/src/broadcom/vulkan/v3dv_image.c index f864180025a..519d3f1626f 100644 --- a/src/broadcom/vulkan/v3dv_image.c +++ b/src/broadcom/vulkan/v3dv_image.c @@ -658,7 +658,6 @@ v3dv_CreateImageView(VkDevice _device, iview->vk_format = format; iview->format = v3dv_get_format(format); assert(iview->format && iview->format->supported); - iview->swap_rb = iview->format->swizzle[0] == PIPE_SWIZZLE_Z; if (vk_format_is_depth_or_stencil(iview->vk_format)) { iview->internal_type = v3dv_get_internal_depth_type(iview->vk_format); @@ -671,6 +670,7 @@ v3dv_CreateImageView(VkDevice _device, const uint8_t *format_swizzle = v3dv_get_format_swizzle(format); util_format_compose_swizzles(format_swizzle, image_view_swizzle, iview->swizzle); + iview->swap_rb = iview->swizzle[0] == PIPE_SWIZZLE_Z; pack_texture_shader_state(device, iview); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
