Mesa (master): tu: Fall back to 3d blit path for BC1_RGB_* formats
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 19 20:18:41 UTC 2020
Module: Mesa
Branch: master
Commit: da68c727156babbb25392d8c2efeec410cb69d2e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da68c727156babbb25392d8c2efeec410cb69d2e
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Tue May 19 15:39:18 2020 +0200
tu: Fall back to 3d blit path for BC1_RGB_* formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5098>
---
src/freedreno/vulkan/tu_clear_blit.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/vulkan/tu_clear_blit.c b/src/freedreno/vulkan/tu_clear_blit.c
index 3c2411e76a4..2b6668a1785 100644
--- a/src/freedreno/vulkan/tu_clear_blit.c
+++ b/src/freedreno/vulkan/tu_clear_blit.c
@@ -1141,7 +1141,17 @@ tu6_blit_image(struct tu_cmd_buffer *cmd,
mask = 0x8;
}
- if (dst_image->samples > 1)
+ /* BC1_RGB_* formats need to have their last components overriden with 1
+ * when sampling, which is normally handled with the texture descriptor
+ * swizzle. The 2d path can't handle that, so use the 3d path.
+ *
+ * TODO: we could use RB_2D_BLIT_CNTL::MASK to make these formats work with
+ * the 2d path.
+ */
+
+ if (dst_image->samples > 1 ||
+ src_image->vk_format == VK_FORMAT_BC1_RGB_UNORM_BLOCK ||
+ src_image->vk_format == VK_FORMAT_BC1_RGB_SRGB_BLOCK)
ops = &r3d_ops;
/* TODO: shader path fails some of blit_image.all_formats.generate_mipmaps.* tests,
More information about the mesa-commit
mailing list