Skip to content
Snippets Groups Projects
Commit fcfc4ddf authored by Roman Stratiienko's avatar Roman Stratiienko Committed by Marge Bot
Browse files

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: 79e44514 ("v3dv: move extensions table to v3dv_device")
Signed-off-by: default avatarRoman Stratiienko <roman.o.stratiienko@globallogic.com>
Reviewed-by: default avatarAlejandro Piñeiro <apinheiro@igalia.com>
Part-of: <mesa/mesa!14144>
parent 2ad11b39
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment