From: notaz Date: Fri, 1 Nov 2024 00:04:33 +0000 (+0200) Subject: gpulib: use mmap callbacks for platforms that have it X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a3e25536051f9abb92c0bc90eba72c4c0e9ac04;p=pcsx_rearmed.git 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. --- 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