v3dv: don't expose image load/store features for linear images
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15342>
This commit is contained in:

committed by
Marge Bot

parent
0590ce1362
commit
5a11a2fb6c
@@ -181,15 +181,17 @@ image_format_features(struct v3dv_physical_device *pdevice,
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user