From 7219ef7fa8b03d009920e959612ec7ec1da2efb4 Mon Sep 17 00:00:00 2001 From: SolDev69 Date: Mon, 20 Nov 2023 12:05:23 -0500 Subject: [PATCH] test changes --- src/android_stub/meson.build | 2 +- .../target-helpers/inline_sw_helper.h | 10 ++-- src/util/os_misc.c | 53 ------------------- 3 files changed, 6 insertions(+), 59 deletions(-) diff --git a/src/android_stub/meson.build b/src/android_stub/meson.build index 6097ae8ef07..0e3f27bc4a5 100644 --- a/src/android_stub/meson.build +++ b/src/android_stub/meson.build @@ -1,6 +1,6 @@ if with_android_stub stub_libs = [] - lib_names = ['cutils', 'hardware', 'log', 'nativewindow', 'sync'] + lib_names = ['hardware', 'log', 'nativewindow', 'sync'] if with_libbacktrace lib_names += ['backtrace'] diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h index f5f6a74f3c1..8ff69ee9396 100644 --- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h @@ -32,11 +32,7 @@ #ifdef GALLIUM_D3D12 #include "d3d12/d3d12_public.h" #endif - -#ifdef GALLIUM_FREEDRENO -#include "freedreno/freedreno_screen.h" -#endif - +#ifdef #if defined(GALLIUM_ASAHI) && __APPLE__ #include "asahi/agx_public.h" #endif @@ -82,6 +78,10 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) return screen ? debug_screen_wrap(screen) : NULL; } +struct pipe_screen *fd_screen_create(int fd, + const struct pipe_screen_config *config, + struct renderonly *ro); + #if defined(GALLIUM_FREEDRENO) if(screen == NULL && strcmp(driver, "freedreno") == 0) { int kbase_device_fd = open("/dev/kgsl-3d0", O_RDWR | O_CLOEXEC | O_NONBLOCK); diff --git a/src/util/os_misc.c b/src/util/os_misc.c index 6ae97b983bb..c7eb58bdfaa 100644 --- a/src/util/os_misc.c +++ b/src/util/os_misc.c @@ -56,7 +56,6 @@ # define LOG_TAG "MESA" # include # include -# include #elif DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || DETECT_OS_HURD # include #elif DETECT_OS_OPENBSD || DETECT_OS_FREEBSD @@ -128,62 +127,10 @@ os_log_message(const char *message) #endif } -#if DETECT_OS_ANDROID -# include -# include "c11/threads.h" - -/** - * Get an option value from android's property system, as a fallback to - * getenv() (which is generally less useful on android due to processes - * typically being forked from the zygote. - * - * The option name used for getenv is translated into a property name - * by: - * - * 1) convert to lowercase - * 2) replace '_' with '.' - * 3) if necessary, prepend "mesa." - * - * For example: - * - MESA_EXTENSION_OVERRIDE -> mesa.extension.override - * - GALLIUM_HUD -> mesa.gallium.hud - * - */ -static char * -os_get_android_option(const char *name) -{ - static thread_local char os_android_option_value[PROPERTY_VALUE_MAX]; - char key[PROPERTY_KEY_MAX]; - char *p = key, *end = key + PROPERTY_KEY_MAX; - /* add "mesa." prefix if necessary: */ - if (strstr(name, "MESA_") != name) - p += strlcpy(p, "mesa.", end - p); - p += strlcpy(p, name, end - p); - for (int i = 0; key[i]; i++) { - if (key[i] == '_') { - key[i] = '.'; - } else { - key[i] = tolower(key[i]); - } - } - - int len = property_get(key, os_android_option_value, NULL); - if (len > 1) { - return os_android_option_value; - } - return NULL; -} -#endif - const char * os_get_option(const char *name) { const char *opt = getenv(name); -#if DETECT_OS_ANDROID - if (!opt) { - opt = os_get_android_option(name); - } -#endif return opt; }