anv/formats: Make alpha blending a property of render targets
authorNanley Chery <nanley.g.chery@intel.com>
Tue, 3 May 2016 17:08:44 +0000 (10:08 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Tue, 24 May 2016 00:26:17 +0000 (17:26 -0700)
In agreement with the SNB PRM, alpha blending is a property that render
targets may or may not support.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_formats.c

index a920ab43a0483d49b22695ad771c3d3a2dfc72b9..a0fa976da9f7cadb312590d6d8f12c2206c04b57 100644 (file)
@@ -329,11 +329,9 @@ get_image_format_properties(int gen, enum isl_format base,
        format.swizzle.a == ISL_CHANNEL_SELECT_ALPHA) {
       flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
                VK_FORMAT_FEATURE_BLIT_DST_BIT;
-   }
 
-   if (info->alpha_blend <= gen &&
-       format.swizzle.a == ISL_CHANNEL_SELECT_ALPHA) {
-      flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
+      if (info->alpha_blend <= gen)
+         flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
    }
 
    /* Load/store is determined based on base format.  This prevents RGB