mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
This PR replaces the statically linked vulkan loader with dynamic loading of vulkan loader. This is more in line how other software integrate vulkan and makes it easier for vendors to help out with issues. Volk has been placed in its own namespace (volk) this to overcome issues as USD/Hydra still loads the vulkan loader statically. These changes had already been applied upstream a year ago. volk is added to extern as it requires an application specific compilation unit for configuration. Pull Request: https://projects.blender.org/blender/blender/pulls/139630
24 lines
774 B
C++
24 lines
774 B
C++
/* SPDX-FileCopyrightText: 2026 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#define VOLK_IMPLEMENTATION
|
|
#ifdef _WIN32
|
|
# define VK_USE_PLATFORM_WIN32_KHR
|
|
#elif defined(__APPLE__)
|
|
# define VK_USE_PLATFORM_METAL_EXT
|
|
#else
|
|
# define VK_USE_PLATFORM_WAYLAND_KHR
|
|
# define VK_USE_PLATFORM_XLIB_KHR
|
|
#endif
|
|
|
|
/* NOTE: Blender uses device specific symbol tables. To ease development we hide the
|
|
* global device prototypes and move the instance symbols into the volk namespace. With
|
|
* these changes most runtime null reference error becomes a compile time check.
|
|
*
|
|
* Runtime errors can still happen when an extension isn't enabled or driver doesn't
|
|
* support the extension. */
|
|
#define VOLK_NAMESPACE
|
|
#define VOLK_NO_GLOBAL_PROTOTYPES
|
|
|
|
#include "volk.h"
|