mirror of
https://github.com/termux/termux-packages.git
synced 2025-06-03 15:25:17 +00:00
74 lines
2.8 KiB
Diff
74 lines
2.8 KiB
Diff
--- a/third_party/vulkan-validation-layers/src/layers/error_message/logging.h
|
|
+++ b/third_party/vulkan-validation-layers/src/layers/error_message/logging.h
|
|
@@ -33,7 +33,7 @@
|
|
#include "generated/vk_layer_dispatch_table.h"
|
|
#include "generated/vk_object_types.h"
|
|
|
|
-#if defined __ANDROID__
|
|
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
|
#include <android/log.h>
|
|
#define LOGCONSOLE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "VALIDATION", __VA_ARGS__))
|
|
[[maybe_unused]] static const char *kForceDefaultCallbackKey = "debug.vvl.forcelayerlog";
|
|
--- a/third_party/vulkan-validation-layers/src/layers/vk_layer_config.cpp
|
|
+++ b/third_party/vulkan-validation-layers/src/layers/vk_layer_config.cpp
|
|
@@ -52,7 +52,7 @@
|
|
#endif
|
|
|
|
std::string GetEnvironment(const char *variable) {
|
|
-#if !defined(__ANDROID__) && !defined(_WIN32)
|
|
+#if !(defined(__ANDROID__) && !defined(__TERMUX__)) && !defined(_WIN32)
|
|
const char *output = getenv(variable);
|
|
return output == NULL ? "" : output;
|
|
#elif defined(_WIN32)
|
|
@@ -90,7 +90,7 @@
|
|
}
|
|
|
|
void SetEnvironment(const char *variable, const char *value) {
|
|
-#if !defined(__ANDROID__) && !defined(_WIN32)
|
|
+#if (!defined(__ANDROID__) && !defined(_WIN32)) || defined(__TERMUX__)
|
|
setenv(variable, value, 1);
|
|
#elif defined(_WIN32)
|
|
SetEnvironmentVariable(variable, value);
|
|
--- a/third_party/vulkan-validation-layers/src/layers/utils/android_ndk_types.h
|
|
+++ b/third_party/vulkan-validation-layers/src/layers/utils/android_ndk_types.h
|
|
@@ -29,7 +29,9 @@
|
|
|
|
#pragma once
|
|
|
|
-#if defined(__ANDROID__) && !defined(VK_USE_PLATFORM_ANDROID_KHR)
|
|
+#include <sys/cdefs.h>
|
|
+
|
|
+#if (defined(__ANDROID__) && !defined(__TERMUX__)) && !defined(VK_USE_PLATFORM_ANDROID_KHR)
|
|
#error "VK_USE_PLATFORM_ANDROID_KHR not defined for Android build!"
|
|
#endif
|
|
|
|
--- a/third_party/vulkan-utility-libraries/src/src/layer/layer_settings_manager.cpp
|
|
+++ b/third_party/vulkan-utility-libraries/src/src/layer/layer_settings_manager.cpp
|
|
@@ -32,7 +32,7 @@
|
|
#include <array>
|
|
#include <algorithm>
|
|
|
|
-#if defined(__ANDROID__)
|
|
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
|
/*
|
|
* Use the __system_property_read_callback API that appeared in
|
|
* Android API level 26. If not avaible use the old __system_property_get function.
|
|
@@ -68,7 +68,7 @@
|
|
#endif
|
|
|
|
static std::string GetEnvironment(const char *variable) {
|
|
-#if defined(__ANDROID__)
|
|
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
|
std::string result = GetAndroidProperty(variable);
|
|
// Workaround for screenshot layer backward compatibility
|
|
if (result.empty() && std::string(variable) == "debug.vulkan.screenshot.frames") {
|
|
@@ -214,7 +214,7 @@
|
|
}
|
|
#endif
|
|
|
|
-#ifdef __ANDROID__
|
|
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
|
std::string env_path = GetEnvironment("debug.vulkan.khronos_profiles.settings_path");
|
|
#else
|
|
// Look for an environment variable override for the settings file location
|