zink: fix core support on Android

- use legacy EGL driver interface
- use Android Vulkan loader
- avoid unrelated kopper source files

v2: update false #elif to #else

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18453>
This commit is contained in:
Yiwei Zhang 2022-09-06 19:25:10 +00:00 committed by Marge Bot
parent 8fe667afbb
commit 76397d18ae
3 changed files with 7 additions and 2 deletions

View file

@ -56,6 +56,8 @@
#include <unistd.h>
#if DETECT_OS_APPLE
#define VK_LIBNAME "libvulkan.1.dylib"
#elif DETECT_OS_ANDROID
#define VK_LIBNAME "libvulkan.so"
#else
#define VK_LIBNAME "libvulkan.so.1"
#endif

View file

@ -44,7 +44,7 @@ if with_dri2
endif
libdri_c_args = []
if with_gallium_zink
if with_gallium_zink and not with_platform_android
if get_option('glvnd')
libdri_c_args += '-DKOPPER_LIB_NAMES="libEGL_@0@ and libGLX_@0@"'.format(get_option('glvnd-vendor-name'))
else

View file

@ -125,13 +125,16 @@ DEFINE_LOADER_DRM_ENTRYPOINT(lima)
#endif
#if defined(GALLIUM_ZINK) && !defined(__APPLE__)
#if defined(ANDROID)
DEFINE_LOADER_DRM_ENTRYPOINT(zink);
#else
const __DRIextension **__driDriverGetExtensions_zink(void);
PUBLIC const __DRIextension **__driDriverGetExtensions_zink(void)
{
return galliumvk_driver_extensions;
}
#endif
#endif
#if defined(GALLIUM_D3D12)