summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_formats.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-01-20 19:39:03 -0800
committerJason Ekstrand <[email protected]>2017-01-24 12:27:48 -0800
commit6d7911183418a9188c67a50df8135f61ea87cb02 (patch)
tree4bf9d4f5537d12377020ab2442799203667f36d8 /src/intel/vulkan/anv_formats.c
parent8a8630486b69b3ad306763ca14eda5f63bbf9cc6 (diff)
anv: Report FORMAT_FEATURE_TRANSFER_SRC/DST_BIT_KHR
As of VK_KHR_maintenance1, these are supposed to be reported for any formats on which we support transfer operations. For us, this is anything that we can texture from. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_formats.c')
-rw-r--r--src/intel/vulkan/anv_formats.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index a5d783e6897..f4183f0c362 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -348,6 +348,11 @@ get_image_format_properties(const struct gen_device_info *devinfo,
if (base == ISL_FORMAT_R32_SINT || base == ISL_FORMAT_R32_UINT)
flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT;
+ if (flags) {
+ flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
+ }
+
return flags;
}
@@ -372,6 +377,11 @@ get_buffer_format_properties(const struct gen_device_info *devinfo,
if (format == ISL_FORMAT_R32_SINT || format == ISL_FORMAT_R32_UINT)
flags |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT;
+ if (flags) {
+ flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
+ }
+
return flags;
}
@@ -393,7 +403,9 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
- VK_FORMAT_FEATURE_BLIT_DST_BIT;
+ VK_FORMAT_FEATURE_BLIT_DST_BIT |
+ VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
} else {
struct anv_format linear_fmt, tiled_fmt;
linear_fmt = anv_get_format(&physical_device->info, format,