From 2a3e25536051f9abb92c0bc90eba72c4c0e9ac04 Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 1 Nov 2024 02:04:33 +0200 Subject: [PATCH] gpulib: use mmap callbacks for platforms that have it I think this was lost in some refactoring. Also use minimum alignment of at least (x86) cache line size. --- plugins/gpulib/gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index 03be13d0..c4702d2f 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -240,7 +240,7 @@ static noinline void get_gpu_info(uint32_t data) // fills. (Will change this value if it ever gets large page support) #define VRAM_ALIGN 8192 #else - #define VRAM_ALIGN 16 + #define VRAM_ALIGN 64 #endif // double, for overdraw guard + at least 1 page before @@ -250,7 +250,7 @@ static noinline void get_gpu_info(uint32_t data) static uint16_t *vram_ptr_orig = NULL; #ifndef GPULIB_USE_MMAP -# ifdef __linux__ +# if defined(__linux__) || defined(_3DS) || defined(HAVE_LIBNX) || defined(VITA) # define GPULIB_USE_MMAP 1 # else # define GPULIB_USE_MMAP 0 -- 2.39.5