vk_format_description(vk_format);
assert(desc);
- if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN && desc->is_array) {
- flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
- if (desc->nr_channels == 1 && vk_format_is_int(vk_format))
- flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT;
- } else if (vk_format == VK_FORMAT_A2B10G10R10_UNORM_PACK32 ||
- vk_format == VK_FORMAT_A2B10G10R10_UINT_PACK32 ||
- vk_format == VK_FORMAT_B10G11R11_UFLOAT_PACK32) {
- /* To comply with shaderStorageImageExtendedFormats */
- flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
+ if (tiling != VK_IMAGE_TILING_LINEAR) {
+ if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN && desc->is_array) {
+ flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
+ if (desc->nr_channels == 1 && vk_format_is_int(vk_format))
+ flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT;
+ } else if (vk_format == VK_FORMAT_A2B10G10R10_UNORM_PACK32 ||
+ vk_format == VK_FORMAT_A2B10G10R10_UINT_PACK32 ||
+ vk_format == VK_FORMAT_B10G11R11_UFLOAT_PACK32) {
+ /* To comply with shaderStorageImageExtendedFormats */
+ flags |= VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
+ }
}
if (flags) {