summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_formats.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-01-27 00:03:06 -0500
committerBas Nieuwenhuizen <[email protected]>2017-01-30 08:42:26 +0100
commit4eae3597eb390171f165d2bb62c2d48cc0b18a7d (patch)
tree21a6a8ca192fb42cd49a1140cac6eb31bea5321e /src/amd/vulkan/radv_formats.c
parent34bfe4b1bb68b579b376033ce5ed4b4520d2dc28 (diff)
radv: Expose transfer format features.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_formats.c')
-rw-r--r--src/amd/vulkan/radv_formats.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index e147f94074c..f18ecee9d2a 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -570,6 +570,8 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
VK_FORMAT_FEATURE_BLIT_DST_BIT;
+ tiled |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
}
} else {
bool linear_sampling;
@@ -591,6 +593,15 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
tiled |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
}
}
+ if (util_is_power_of_two(vk_format_get_blocksize(format))) {
+ tiled |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
+ }
+ }
+
+ if (util_is_power_of_two(vk_format_get_blocksize(format))) {
+ linear |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
}
if (format == VK_FORMAT_R32_UINT || format == VK_FORMAT_R32_SINT) {