From 459f02ad03fa10b5c403fed724d47fe5adfd5fb1 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 30 Jun 2024 02:23:25 +0300 Subject: [PATCH] gpu_neon: revive the old tests --- plugins/gpu_neon/psx_gpu/psx_gpu_main.c | 15 ++++++++------- plugins/gpu_neon/psx_gpu/tests/Makefile | 5 ++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c index 435c51a2..5f1f3834 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c @@ -136,7 +136,8 @@ int main(int argc, char *argv[]) FILE *list_file; u32 no_display = 0; s32 dummy0 = 0; - u32 dummy1 = 0; + s32 dummy1 = 0; + u32 dummy2 = 0; if((argc != 3) && (argc != 4)) { @@ -180,7 +181,7 @@ int main(int argc, char *argv[]) u32 fbdev_handle = open("/dev/fb1", O_RDWR); vram_ptr = (mmap((void *)0x50000000, 1024 * 1024 * 2, PROT_READ | PROT_WRITE, MAP_SHARED | 0xA0000000, fbdev_handle, 0)); -#elif 1 +#elif 0 #ifndef MAP_HUGETLB #define MAP_HUGETLB 0x40000 /* arch specific */ #endif @@ -211,23 +212,23 @@ int main(int argc, char *argv[]) clear_stats(); -#ifdef NEON_BUILD +#ifdef CYCLE_COUNTER init_counter(); #endif - gpu_parse(psx_gpu, list, size, &dummy0, &dummy1); + gpu_parse(psx_gpu, list, size, &dummy0, &dummy1, &dummy2); flush_render_block_buffer(psx_gpu); clear_stats(); -#ifdef NEON_BUILD +#ifdef CYCLE_COUNTER u32 cycles = get_counter(); #endif - gpu_parse(psx_gpu, list, size, &dummy0, &dummy1); + gpu_parse(psx_gpu, list, size, &dummy0, &dummy1, &dummy2); flush_render_block_buffer(psx_gpu); -#ifdef NEON_BUILD +#ifdef CYCLE_COUNTER u32 cycles_elapsed = get_counter() - cycles; printf("%-64s: %d\n", argv[1], cycles_elapsed); diff --git a/plugins/gpu_neon/psx_gpu/tests/Makefile b/plugins/gpu_neon/psx_gpu/tests/Makefile index bb91a5a8..21d61558 100644 --- a/plugins/gpu_neon/psx_gpu/tests/Makefile +++ b/plugins/gpu_neon/psx_gpu/tests/Makefile @@ -4,7 +4,7 @@ CFLAGS += -Wall -ggdb CFLAGS += -fno-strict-aliasing CFLAGS += `sdl-config --cflags` -LDFLAGS += `sdl-config --libs` +LDLIBS += `sdl-config --libs` VPATH += .. @@ -12,6 +12,9 @@ ifdef NEON CFLAGS += -mcpu=cortex-a8 -mfpu=neon -DNEON_BUILD ASFLAGS = $(CFLAGS) OBJ += psx_gpu_arm_neon.o +else +CFLAGS += -DNEON_BUILD -DSIMD_BUILD +OBJ += psx_gpu_simd.o endif ifndef DEBUG CFLAGS += -O2 -DNDEBUG -- 2.39.5