vulkan/wsi/wl: correctly find whether the compositor uses the same GPU
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 21 Oct 2022 08:37:32 +0000 (11:37 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Oct 2022 20:34:15 +0000 (20:34 +0000)
commitdb42ed1e04cc7c9b92fb22cc2eef7f62e73aabba
tree1be013780ca2e8cdc2f7268c2657b4ef42f93ead
parent93dbd14ed77a034a8c08521077d753fc47738c58
vulkan/wsi/wl: correctly find whether the compositor uses the same GPU

Using the wl_drm protocol we can check whether the compositor uses the
same GPU as the application.

This allows to run vulkan applications using a DG2 GPU with the
compositor using another card.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19224>
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_wayland.c