vulkan/wsi/display: don't report support if there is no drm fd

This partially deals with
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4688

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10430>
(cherry picked from commit 6b61fbca8b)
This commit is contained in:
Lionel Landwerlin 2021-04-23 13:26:46 +03:00 committed by Dylan Baker
parent d501b039cc
commit 6b1197e728
2 changed files with 5 additions and 2 deletions

View file

@ -544,7 +544,7 @@
"description": "vulkan/wsi/display: don't report support if there is no drm fd",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -815,7 +815,10 @@ wsi_display_surface_get_support(VkIcdSurfaceBase *surface,
uint32_t queueFamilyIndex,
VkBool32* pSupported)
{
*pSupported = VK_TRUE;
struct wsi_display *wsi =
(struct wsi_display *) wsi_device->wsi[VK_ICD_WSI_PLATFORM_DISPLAY];
*pSupported = wsi->fd != -1;
return VK_SUCCESS;
}