Dylan Aïssi pushed to branch upstream at X Strike Force / vulkan / vulkan-volk
Commits:
88931c9d by Dylan Aïssi at 2024-05-31T15:14:05+02:00
New upstream version 1.3.283.0
- - - - -
4 changed files:
- CMakeLists.txt
- README.md
- volk.c
- volk.h
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -4,7 +4,7 @@ cmake_policy(SET CMP0048 NEW) # project(... VERSION ...) support
project(volk VERSION
# VOLK_GENERATE_VERSION
-280
+283
# VOLK_GENERATE_VERSION
LANGUAGES C
)
@@ -12,7 +12,7 @@ project(volk VERSION
# CMake 3.12 changes the default behaviour of option() to leave local variables
# unchanged if they exist (which we want), but we must work with older CMake
versions.
if(NOT DEFINED VOLK_STATIC_DEFINES)
- option(VOLK_STATIC_DEFINES "Additional defines for building the volk static
library, e.g. Vulkan platform defines" "")
+ set(VOLK_STATIC_DEFINES "" CACHE STRING "Additional defines for building the
volk static library, e.g. Vulkan platform defines")
endif()
if(NOT DEFINED VOLK_PULL_IN_VULKAN)
option(VOLK_PULL_IN_VULKAN "Vulkan as a transitive dependency" ON)
@@ -24,7 +24,7 @@ if(NOT DEFINED VOLK_HEADERS_ONLY)
option(VOLK_HEADERS_ONLY "Add interface library only" OFF)
endif()
if(NOT DEFINED VULKAN_HEADERS_INSTALL_DIR)
- option(VULKAN_HEADERS_INSTALL_DIR "Where to get the Vulkan headers" "")
+ set(VULKAN_HEADERS_INSTALL_DIR "" CACHE PATH "Where to get the Vulkan
headers")
endif()
# -----------------------------------------------------
=====================================
README.md
=====================================
@@ -12,7 +12,7 @@ volk is written in C89 and supports Windows, Linux, Android
and macOS (via Molte
There are multiple ways to use volk in your project:
-1. You can just add `volk.c` to your build system. Note that the usual
preprocessor defines that enable Vulkan's platform-specific functions
(VK_USE_PLATFORM_WIN32_KHR, VK_USE_PLATFORM_XLIB_KHR,
VK_USE_PLATFORM_MACOS_MVK, etc) must be passed as desired to the compiler when
building `volk.c`.
+1. You can add `volk.c` to your build system. Note that the usual preprocessor
defines that enable Vulkan's platform-specific functions
(VK_USE_PLATFORM_WIN32_KHR, VK_USE_PLATFORM_XLIB_KHR,
VK_USE_PLATFORM_MACOS_MVK, etc) must be passed as desired to the compiler when
building `volk.c`.
2. You can use provided CMake files, with the usage detailed below.
3. You can use volk in header-only fashion. Include `volk.h` wherever you want
to use Vulkan functions. In exactly one source file, define
`VOLK_IMPLEMENTATION` before including `volk.h`. Do not build `volk.c` at all
in this case - however, `volk.c` must still be in the same directory as
`volk.h`. This method of integrating volk makes it possible to set the platform
defines mentioned above with arbitrary (preprocessor) logic in your code.
=====================================
volk.c
=====================================
@@ -31,6 +31,17 @@ __declspec(dllimport) FARPROC __stdcall
GetProcAddress(HMODULE, LPCSTR);
__declspec(dllimport) int __stdcall FreeLibrary(HMODULE);
#endif
+#if defined(__GNUC__)
+# define VOLK_DISABLE_GCC_PEDANTIC_WARNINGS \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
+# define VOLK_RESTORE_GCC_PEDANTIC_WARNINGS \
+ _Pragma("GCC diagnostic pop")
+#else
+# define VOLK_DISABLE_GCC_PEDANTIC_WARNINGS
+# define VOLK_RESTORE_GCC_PEDANTIC_WARNINGS
+#endif
+
static void* loadedModule = NULL;
static VkInstance loadedInstance = VK_NULL_HANDLE;
static VkDevice loadedDevice = VK_NULL_HANDLE;
@@ -92,8 +103,9 @@ VkResult volkInitialize(void)
module = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
if (!module)
return VK_ERROR_INITIALIZATION_FAILED;
-
+ VOLK_DISABLE_GCC_PEDANTIC_WARNINGS
vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(module,
"vkGetInstanceProcAddr");
+ VOLK_RESTORE_GCC_PEDANTIC_WARNINGS
#endif
loadedModule = module;
=====================================
volk.h
=====================================
@@ -15,7 +15,7 @@
#endif
/* VOLK_GENERATE_VERSION_DEFINE */
-#define VOLK_HEADER_VERSION 280
+#define VOLK_HEADER_VERSION 283
/* VOLK_GENERATE_VERSION_DEFINE */
#ifndef VK_NO_PROTOTYPES
View it on GitLab:
https://salsa.debian.org/xorg-team/vulkan/vulkan-volk/-/commit/88931c9d20e373ec1322cfdfc19f895d296f79ab
--
This project does not include diff previews in email notifications.
View it on GitLab:
https://salsa.debian.org/xorg-team/vulkan/vulkan-volk/-/commit/88931c9d20e373ec1322cfdfc19f895d296f79ab
You're receiving this email because of your account on salsa.debian.org.