v3dv: require optimal tiling for features that reqiure sampling

The hardware can only do sampling with a raster format for 1D textures,
so let's just require optimal for everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga
2020-04-22 13:32:43 +02:00
committed by Marge Bot
parent 831aa5d438
commit ffacf92485
+5 -1
View File
@@ -400,7 +400,11 @@ image_format_features(VkFormat vk_format,
VkFormatFeatureFlags flags = 0;
if (v3dv_format->tex_type != TEXTURE_DATA_FORMAT_NO) {
/* Raster format is only supported for 1D textures, so let's just
* always require optimal tiling for anything that requires sampling.
*/
if (v3dv_format->tex_type != TEXTURE_DATA_FORMAT_NO &&
tiling == VK_IMAGE_TILING_OPTIMAL) {
flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
VK_FORMAT_FEATURE_BLIT_SRC_BIT;