diff options
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_formats.c | 7 | ||||
-rw-r--r-- | src/freedreno/vulkan/vk_format.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c index 24f7f246e36..8ae18433826 100644 --- a/src/freedreno/vulkan/tu_formats.c +++ b/src/freedreno/vulkan/tu_formats.c @@ -395,6 +395,13 @@ tu_physical_device_get_format_properties( optimal |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT; + + if (vk_format_is_float(format) || + vk_format_is_unorm(format) || + vk_format_is_snorm(format) || + vk_format_is_srgb(format)) { + optimal |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT; + } } /* For the most part, we can do anything with a linear image that we could diff --git a/src/freedreno/vulkan/vk_format.h b/src/freedreno/vulkan/vk_format.h index a9b7f1b4a31..7b041b60625 100644 --- a/src/freedreno/vulkan/vk_format.h +++ b/src/freedreno/vulkan/vk_format.h @@ -244,6 +244,12 @@ vk_format_is_srgb(VkFormat format) } static inline bool +vk_format_is_unorm(VkFormat format) +{ + return util_format_is_unorm(vk_format_to_pipe_format(format)); +} + +static inline bool vk_format_is_snorm(VkFormat format) { return util_format_is_snorm(vk_format_to_pipe_format(format)); |