Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vulkan: bump to 1.3.238 #7763

Merged
merged 8 commits into from Jan 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
129 changes: 0 additions & 129 deletions sys-libs/vulkan/patches/vulkan-1.2.203.patchset

This file was deleted.

135 changes: 135 additions & 0 deletions sys-libs/vulkan/patches/vulkan-1.3.238.patchset
@@ -0,0 +1,135 @@
From 0a5bf8341bc6b925464df05d021aa097271c1929 Mon Sep 17 00:00:00 2001
From: X512 <danger_mail@list.ru>
Date: Sun, 9 Jan 2022 06:34:23 +0900
Subject: basic fixes for haiku


diff --git a/loader/loader.c b/loader/loader.c
index e6bf8bd..8919447 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2852,6 +2852,17 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
#if defined(_WIN32)
char *package_path = NULL;
#else
+
+#if defined(__HAIKU__)
+ char *xdg_config_home = NULL;
+ char *xdg_config_dirs = NULL;
+ char *xdg_data_home = NULL;
+ char *xdg_data_dirs =
+ "/boot/home/config/non-packaged/add-ons:"
+ "/boot/home/config/add-ons:"
+ "/boot/system/non-packaged/add-ons:"
+ "/boot/system/add-ons";
+#else
// Determine how much space is needed to generate the full search path
// for the current manifest files.
char *xdg_config_home = loader_secure_getenv("XDG_CONFIG_HOME", inst);
@@ -2870,6 +2881,8 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
if (NULL == xdg_data_dirs || '\0' == xdg_data_dirs[0]) {
xdg_data_dirs = FALLBACK_DATA_DIRS;
}
+#endif
+
#endif

char *home = NULL;
diff --git a/loader/loader_environment.c b/loader/loader_environment.c
index f4205f4..c8299f6 100644
--- a/loader/loader_environment.c
+++ b/loader/loader_environment.c
@@ -36,7 +36,7 @@

// Environment variables
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || defined(__HAIKU__)

bool is_high_integrity() { return geteuid() != getuid() || getegid() != getgid(); }

@@ -48,7 +48,7 @@ char *loader_getenv(const char *name, const struct loader_instance *inst) {
}

char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
// Apple does not appear to have a secure getenv implementation.
// The main difference between secure getenv and getenv is that secure getenv
// returns NULL if the process is being run with elevated privileges by a normal user.
diff --git a/loader/loader_environment.h b/loader/loader_environment.h
index 2eb61d5..eb03fa0 100644
--- a/loader/loader_environment.h
+++ b/loader/loader_environment.h
@@ -36,7 +36,7 @@ char *loader_getenv(const char *name, const struct loader_instance *inst);
void loader_free_getenv(char *val, const struct loader_instance *inst);

#if defined(WIN32) || defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || \
- defined(__FreeBSD__) || defined(__OpenBSD__)
+ defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)

bool is_high_integrity();

@@ -54,4 +54,4 @@ VkResult loader_add_environment_layers(struct loader_instance *inst, const enum
const struct loader_envvar_filter *enable_filter,
const struct loader_envvar_disable_layers_filter *disable_filter,
struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
- const struct loader_layer_list *source_list);
\ No newline at end of file
+ const struct loader_layer_list *source_list);
diff --git a/loader/stack_allocation.h b/loader/stack_allocation.h
index d1958fb..693955c 100644
--- a/loader/stack_allocation.h
+++ b/loader/stack_allocation.h
@@ -36,7 +36,7 @@
#include <stdlib.h>
#endif

-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
#define loader_stack_alloc(size) alloca(size)
#elif defined(_WIN32)
#define loader_stack_alloc(size) _alloca(size)
diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
index 44120f2..adc2359 100644
--- a/loader/vk_loader_platform.h
+++ b/loader/vk_loader_platform.h
@@ -44,7 +44,7 @@
#endif // defined(__Fuchsia__)

#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || defined(__HAIKU__)
#include <unistd.h>
// Note: The following file is for dynamic loading:
#include <dlfcn.h>
@@ -111,7 +111,7 @@
#define ENABLED_LAYERS_ENV "VK_INSTANCE_LAYERS"

#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || defined(__HAIKU__)
/* Linux-specific common code: */

// VK Library Filenames, Paths, etc.:
@@ -233,7 +233,7 @@ static inline void loader_platform_thread_once_fn(pthread_once_t *ctl, void (*fu
#endif

#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
- defined(__OpenBSD__)
+ defined(__OpenBSD__) || defined(__HAIKU__)

// File IO
static inline bool loader_platform_file_exists(const char *path) {
@@ -294,7 +294,7 @@ static inline char *loader_platform_executable_path(char *buffer, size_t size) {

return buffer;
}
-#elif defined(__Fuchsia__) || defined(__OpenBSD__)
+#elif defined(__Fuchsia__) || defined(__OpenBSD__) || defined(__HAIKU__)
static inline char *loader_platform_executable_path(char *buffer, size_t size) { return NULL; }
#elif defined(__QNXNTO__)

--
2.37.3

Expand Up @@ -11,14 +11,14 @@ layers, between an application and the drivers."
HOMEPAGE="https://www.vulkan.org/"
COPYRIGHT="2014-2022 The Khronos Group Inc."
LICENSE="Apache v2"
REVISION="2"
REVISION="1"
SOURCE_URI="https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$portVersion.tar.gz"
SOURCE_FILENAME="Vulkan-Loader-$portVersion.tar.gz"
CHECKSUM_SHA256="a431c627f36f90ce8d1aa752e7a37838db569760a54bb97edaee35dae4743118"
CHECKSUM_SHA256="54efc088258e83304f105d6998adaa54340045f490884b2d136a8584d66cb861"
SOURCE_DIR="Vulkan-Loader-$portVersion"
SOURCE_URI_2="https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$portVersion.tar.gz"
SOURCE_FILENAME_2="Vulkan-Headers-$portVersion.tar.gz"
CHECKSUM_SHA256_2="7239108c372f1fbe365bd8d1610ca2bb4e72b73b2151f2551bf9df54dd539639"
CHECKSUM_SHA256_2="c2b72c5e94bcabb5c276c0d55344f66d3486c9465beb74397aeb7d5bcf537143"
SOURCE_DIR_2="Vulkan-Headers-$portVersion"
PATCHES="vulkan-$portVersion.patchset"

Expand Down Expand Up @@ -60,11 +60,21 @@ defineDebugInfoPackage vulkan$secondaryArchSuffix \

BUILD()
{
cd $sourceDir2
cmake -S . -B build $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-G Ninja

cd ../../$sourceDir
cmake -S . -B build $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DVULKAN_HEADERS_INSTALL_DIR=$sourceDir2 \
-DVulkanRegistry_DIR=$sourceDir2/registry \
-DVulkanHeaders_DIR=$sourceDir2/build \
-DBUILD_WSI_XCB_SUPPORT=Off \
-DBUILD_WSI_XLIB_SUPPORT=Off \
-DBUILD_WSI_WAYLAND_SUPPORT=Off \
-DFALLBACK_CONFIG_DIRS="/boot/home/config/non-packaged/add-ons:/boot/home/config/add-ons:/boot/system/non-packaged/add-ons:/boot/system/add-ons" \
-G Ninja

Expand Down