Skip to content

Commit

Permalink
gpu_neon: revive the old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
notaz committed Jun 29, 2024
1 parent 4a1885e commit 459f02a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 8 additions & 7 deletions plugins/gpu_neon/psx_gpu/psx_gpu_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion plugins/gpu_neon/psx_gpu/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ CFLAGS += -Wall -ggdb
CFLAGS += -fno-strict-aliasing

CFLAGS += `sdl-config --cflags`
LDFLAGS += `sdl-config --libs`
LDLIBS += `sdl-config --libs`

VPATH += ..

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
Expand Down

0 comments on commit 459f02a

Please sign in to comment.