radv: Disable subsampled formats.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 5 May 2019 23:42:21 +0000 (01:42 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 6 May 2019 09:53:37 +0000 (09:53 +0000)
Broken on Polaris and since I discovered NV12 is not subsampled, but
a 2-plane format I decided I don't really care.

Work to do to re-enable:

1) Figure out which devices support it natively.
2) Write some software emulation for the others.

Fixes: 52c1adda21b "radv: Add ycbcr format features."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_formats.c

index 5af172c8e7fe31e994c4b7a64e0b5b21916b888a..f6e5044200939a1b827e1e840550ad7d9ce0fc06 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;