[Mesa-dev] [PATCH 6/7] anv: Allow blitting to/from any supported format

Jason Ekstrand jason at jlekstrand.net
Tue Jan 24 23:45:53 UTC 2017


Now that blorp handles all the cases, why not?
---
 src/intel/vulkan/anv_formats.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index f4183f0..2a924d5 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -319,8 +319,7 @@ get_image_format_properties(const struct gen_device_info *devinfo,
 
    VkFormatFeatureFlags flags = 0;
    if (isl_format_supports_sampling(devinfo, format.isl_format)) {
-      flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
-               VK_FORMAT_FEATURE_BLIT_SRC_BIT;
+      flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
 
       if (isl_format_supports_filtering(devinfo, format.isl_format))
          flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;
@@ -332,8 +331,7 @@ get_image_format_properties(const struct gen_device_info *devinfo,
     */
    if (isl_format_supports_rendering(devinfo, format.isl_format) &&
        format.swizzle.a == ISL_CHANNEL_SELECT_ALPHA) {
-      flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
-               VK_FORMAT_FEATURE_BLIT_DST_BIT;
+      flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT;
 
       if (isl_format_supports_alpha_blending(devinfo, format.isl_format))
          flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
@@ -349,7 +347,9 @@ get_image_format_properties(const struct gen_device_info *devinfo,
       flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT;
 
    if (flags) {
-      flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+      flags |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
+               VK_FORMAT_FEATURE_BLIT_DST_BIT |
+               VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
                VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
    }
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list