OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o
ifeq "$(BUILTIN_GPU)" "neon"
CFLAGS += -DGPU_NEON
-OBJS += plugins/gpu_neon/psx_gpu_if.o plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
+OBJS += plugins/gpu_neon/psx_gpu_if.o
+ifeq "$(HAVE_NEON)" "1"
+OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
+else
+plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
+endif
plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
endif
ifeq "$(BUILTIN_GPU)" "peops"
#ifndef NEON_BUILD
// TODO?
-void scale2x_tiles8(void *dst, const void *src, int w8, int h) {}
+void scale2x_tiles8(void *dst, const void *src, int w8, int h)
+{
+ uint16_t* d = (uint16_t*)dst;
+ const uint16_t* s = (const uint16_t*)src;
+
+ while ( h-- )
+ {
+ uint16_t* d_save = d;
+ const uint16_t* s_save = s;
+ int w = w8;
+
+ while ( w-- )
+ {
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+
+ d[ 0 ] = *s;
+ d[ 1 ] = *s;
+ d[ 1024 ] = *s;
+ d[ 1025 ] = *s;
+ d += 2; s++;
+ }
+
+ d = d_save + 2048;
+ s = s_save + 1024; /* or 512? */
+ }
+}
#endif
static int disable_main_render;
*/
#include <stdio.h>
+
+#ifdef _WIN32
+#include <mman.h>
+#else
#include <sys/mman.h>
+#endif
extern const unsigned char cmd_lengths[256];
#define command_lengths cmd_lengths