Mesa (staging/21.3): v3dv: Fix V3DV_HAS_SURFACE preprocessor condition
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 17 19:44:18 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 537277816938bf31aece001997d1d9d8aff2785a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=537277816938bf31aece001997d1d9d8aff2785a
Author: Roman Stratiienko <roman.o.stratiienko at globallogic.com>
Date: Fri Dec 10 11:08:21 2021 +0200
v3dv: Fix V3DV_HAS_SURFACE preprocessor condition
Currently V3DV_HAS_SURFACE is always defined.
There is no WSI for Android in mesa3d, therefore WSI related extensions
should not be exposed.
1. Define V3DV_HAS_SURFACE only for platforms which has WSI implemented.
2. Rename V3DV_HAS_SURFACE -> V3DV_USE_WSI_PLATFORM to align naming
with other platforms.
Fixes dEQP-VK.wsi.android.surface#query_protected_capabilities
Fixes: 79e445143054 ("v3dv: move extensions table to v3dv_device")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko at globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14144>
(cherry picked from commit fcfc4ddfccd5ab998409304c164b73b62bb3c480)
---
.pick_status.json | 2 +-
src/broadcom/vulkan/v3dv_device.c | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index c9d656f5555..b9dcf9126b4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1606,7 +1606,7 @@
"description": "v3dv: Fix V3DV_HAS_SURFACE preprocessor condition",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "79e445143054a8001cf28ccb6803148a67f1bb55"
},
diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c
index 9801d3a171f..547eeb11020 100644
--- a/src/broadcom/vulkan/v3dv_device.c
+++ b/src/broadcom/vulkan/v3dv_device.c
@@ -75,11 +75,13 @@ v3dv_EnumerateInstanceVersion(uint32_t *pApiVersion)
return VK_SUCCESS;
}
-#define V3DV_HAS_SURFACE (VK_USE_PLATFORM_WIN32_KHR || \
- VK_USE_PLATFORM_WAYLAND_KHR || \
- VK_USE_PLATFORM_XCB_KHR || \
- VK_USE_PLATFORM_XLIB_KHR || \
- VK_USE_PLATFORM_DISPLAY_KHR)
+#if defined(VK_USE_PLATFORM_WIN32_KHR) || \
+ defined(VK_USE_PLATFORM_WAYLAND_KHR) || \
+ defined(VK_USE_PLATFORM_XCB_KHR) || \
+ defined(VK_USE_PLATFORM_XLIB_KHR) || \
+ defined(VK_USE_PLATFORM_DISPLAY_KHR)
+#define V3DV_USE_WSI_PLATFORM
+#endif
static const struct vk_instance_extension_table instance_extensions = {
.KHR_device_group_creation = true,
@@ -91,7 +93,7 @@ static const struct vk_instance_extension_table instance_extensions = {
.KHR_external_memory_capabilities = true,
.KHR_external_semaphore_capabilities = true,
.KHR_get_physical_device_properties2 = true,
-#ifdef V3DV_HAS_SURFACE
+#ifdef V3DV_USE_WSI_PLATFORM
.KHR_get_surface_capabilities2 = true,
.KHR_surface = true,
.KHR_surface_protected_capabilities = true,
More information about the mesa-commit
mailing list