zink: Fixed header location and compiling issue with [[deprecated]] from newer MoltenVK versions.
From Vulkan 1.3.250 the MoltenVK include filenames changed. Now include the newer 'MoltenVK/mvk_vulkan.h' instead of the older `MoltenVK/vk_mvk_moltenvk.h` headers. From Vulkan 1.3.275 the MoltenVK include location changed. The meson build options 'moltenvk-dir' now needs to point at the root of the Vulkan SDK install. It will look for the presence of the older 'MoltenVK/include' loction and the newer 'macos/include' location. Tested against Vulkan SDK versions: 1.3.250, 1.3.261, 1.3.268, 1.3.275. Will not work compile with Vulkan 1.3.234 or earlier. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
This commit is contained in:
committed by
Marge Bot
parent
47bbd1c7ff
commit
32ac90d8c2
@@ -81,7 +81,15 @@ if host_machine.system() == 'darwin'
|
||||
|
||||
# MoltenVK options
|
||||
if with_moltenvk_dir != ''
|
||||
inc_zink_vk += include_directories(join_paths(with_moltenvk_dir, 'include'))
|
||||
fs = import('fs')
|
||||
moltenvk_includes = join_paths(with_moltenvk_dir, 'MoltenVK', 'include')
|
||||
if not fs.is_dir(moltenvk_includes)
|
||||
moltenvk_includes = join_paths(with_moltenvk_dir, 'macos', 'include')
|
||||
if not fs.is_dir(moltenvk_includes)
|
||||
error(f'moltenvk includes cannot be found in moltenvk-dir="@with_moltenvk_dir@"')
|
||||
endif
|
||||
endif
|
||||
inc_zink_vk += include_directories(moltenvk_includes)
|
||||
else
|
||||
error('moltenvk-dir is required but not set.')
|
||||
endif
|
||||
|
||||
@@ -72,10 +72,11 @@ header_code = """
|
||||
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#ifdef __APPLE__
|
||||
#include "MoltenVK/mvk_vulkan.h"
|
||||
// Source of MVK_VERSION
|
||||
#include "MoltenVK/vk_mvk_moltenvk.h"
|
||||
#endif
|
||||
#include "MoltenVK/mvk_config.h"
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
struct pipe_screen;
|
||||
struct zink_screen;
|
||||
|
||||
@@ -59,10 +59,11 @@
|
||||
#define DRM_FORMAT_MOD_LINEAR 0
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#ifdef __APPLE__
|
||||
#include "MoltenVK/mvk_vulkan.h"
|
||||
// Source of MVK_VERSION
|
||||
#include "MoltenVK/vk_mvk_moltenvk.h"
|
||||
#endif
|
||||
#include "MoltenVK/mvk_config.h"
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#define ZINK_EXTERNAL_MEMORY_HANDLE 999
|
||||
|
||||
|
||||
@@ -80,10 +80,14 @@ bool zink_tracing = false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#ifdef __APPLE__
|
||||
#include "MoltenVK/mvk_vulkan.h"
|
||||
// Source of MVK_VERSION
|
||||
#include "MoltenVK/vk_mvk_moltenvk.h"
|
||||
#endif
|
||||
#include "MoltenVK/mvk_config.h"
|
||||
#define VK_NO_PROTOTYPES
|
||||
#include "MoltenVK/mvk_deprecated_api.h"
|
||||
#include "MoltenVK/mvk_private_api.h"
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#ifdef HAVE_LIBDRM
|
||||
#include "drm-uapi/dma-buf.h"
|
||||
|
||||
Reference in New Issue
Block a user