Mesa (staging/21.3): radv: do not expose buffer features for depth/stencil formats
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 9 22:03:12 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 454fa0f29d7eb302f934c275443a7c743f15370b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=454fa0f29d7eb302f934c275443a7c743f15370b
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Mon Nov 8 08:50:14 2021 +0100
radv: do not expose buffer features for depth/stencil formats
The Vulkan spec got clarified recently and it's invalid (hw can support
it though). Fixes new CTS dEQP-VK.api.buffer.invalid_buffer_features.*.
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13701>
(cherry picked from commit ca7c748f45a9336fd22ca2c88b61ee4142821235)
---
.pick_status.json | 2 +-
src/amd/vulkan/radv_formats.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 25a848011c6..e91a28f1ac2 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -193,7 +193,7 @@
"description": "radv: do not expose buffer features for depth/stencil formats",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 8d355d3a28d..6b5692d7690 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -868,6 +868,11 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
tiled |= VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR;
}
+ /* It's invalid to expose buffer features with depth/stencil formats. */
+ if (vk_format_is_depth_or_stencil(format)) {
+ buffer = 0;
+ }
+
out_properties->linearTilingFeatures = linear;
out_properties->optimalTilingFeatures = tiled;
out_properties->bufferFeatures = buffer;
More information about the mesa-commit
mailing list