Mesa (staging/19.1): radv: Disable subsampled formats.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 7 10:49:05 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: ed0d4eaa4ce4e609737c349e31b7692c7a35902b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed0d4eaa4ce4e609737c349e31b7692c7a35902b

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Mon May  6 01:42:21 2019 +0200

radv: Disable subsampled formats.

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 at gmail.com>
(cherry picked from commit 5cbe12ad1b8934c932f19070044563b9f3b9ab21)

---

 src/amd/vulkan/radv_formats.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 5af172c8e7f..f6e50442009 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -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;




More information about the mesa-commit mailing list