ac,radv: remove the vec3 restriction with LLVM 9+
[mesa.git] / src / amd / vulkan / radv_formats.c
index 5af172c8e7fe31e994c4b7a64e0b5b21916b888a..d7b560082f631701aa15b710fc605e9e5a608b73 100644 (file)
@@ -635,7 +635,8 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
        const struct vk_format_description *desc = vk_format_description(format);
        bool blendable;
        bool scaled = false;
-       if (!desc) {
+       /* TODO: implement some software emulation of SUBSAMPLED formats. */
+       if (!desc || desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) {
                out_properties->linearTilingFeatures = linear;
                out_properties->optimalTilingFeatures = tiled;
                out_properties->bufferFeatures = buffer;
@@ -655,6 +656,7 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
                uint32_t tiling = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT |
                                  VK_FORMAT_FEATURE_TRANSFER_DST_BIT |
                                  VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
+                                 VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT |
                                  VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT;
 
                /* The subsampled formats have no support for linear filters. */
@@ -759,7 +761,7 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
        case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
        case VK_FORMAT_A2R10G10B10_SINT_PACK32:
        case VK_FORMAT_A2B10G10R10_SINT_PACK32:
-               if (physical_device->rad_info.chip_class <= VI &&
+               if (physical_device->rad_info.chip_class <= GFX8 &&
                    physical_device->rad_info.family != CHIP_STONEY) {
                        buffer &= ~(VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT |
                                    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT);