From: notaz Date: Tue, 24 Dec 2024 17:57:57 +0000 (+0200) Subject: gpu_neon: unbreak tests X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df05223dd3dffa5e314108a7358ce4e0d7eba2e3;p=pcsx_rearmed.git gpu_neon: unbreak tests --- diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c index 19f1c199..b37c277a 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu.c @@ -5067,6 +5067,7 @@ void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram) psx_gpu->dither_table[1] = dither_table_row(2, -2, 3, -1); psx_gpu->dither_table[2] = dither_table_row(-3, 1, -4, 0); psx_gpu->dither_table[3] = dither_table_row(3, -1, 2, -2); + psx_gpu->allow_dithering = 1; psx_gpu->primitive_type = PRIMITIVE_TYPE_UNKNOWN; diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c index 5f1f3834..30ec48c4 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c @@ -18,6 +18,12 @@ #include "SDL.h" #include "common.h" +#include "../../gpulib/gpu.h" +#include "psx_gpu.c" +#include "psx_gpu_parse.c" + +#pragma GCC diagnostic ignored "-Wunused-result" + extern u32 span_pixels; extern u32 span_pixel_blocks; extern u32 spans; diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c index 03d055d5..95f30120 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c @@ -346,7 +346,8 @@ u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size, { u32 i, simplified_count; set_texture(psx_gpu, list[4] >> 16); - if ((simplified_count = prim_try_simplify_quad_t(siplified_prim, list))) + if (!(psx_gpu->render_state_base & RENDER_STATE_DITHER) && + (simplified_count = prim_try_simplify_quad_t(siplified_prim, list))) { for (i = 0; i < simplified_count; i++) { const u32 *list_ = &siplified_prim[i * 4]; @@ -412,7 +413,8 @@ u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size, { u32 i, simplified_count; set_texture(psx_gpu, list[5] >> 16); - if ((simplified_count = prim_try_simplify_quad_gt(siplified_prim, list))) + if (!(psx_gpu->render_state_base & RENDER_STATE_DITHER) && + (simplified_count = prim_try_simplify_quad_gt(siplified_prim, list))) { for (i = 0; i < simplified_count; i++) { const u32 *list_ = &siplified_prim[i * 4]; @@ -1292,7 +1294,8 @@ u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size, { u32 i, simplified_count; set_texture(psx_gpu, list[4] >> 16); - if ((simplified_count = prim_try_simplify_quad_t(siplified_prim, list))) + if (!(psx_gpu->render_state_base & RENDER_STATE_DITHER) && + (simplified_count = prim_try_simplify_quad_t(siplified_prim, list))) { for (i = 0; i < simplified_count; i++) { const u32 *list_ = &siplified_prim[i * 4]; @@ -1356,7 +1359,8 @@ u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size, { u32 i, simplified_count; set_texture(psx_gpu, list[5] >> 16); - if ((simplified_count = prim_try_simplify_quad_gt(siplified_prim, list))) + if (!(psx_gpu->render_state_base & RENDER_STATE_DITHER) && + (simplified_count = prim_try_simplify_quad_gt(siplified_prim, list))) { for (i = 0; i < simplified_count; i++) { const u32 *list_ = &siplified_prim[i * 4]; diff --git a/plugins/gpu_neon/psx_gpu/tests/Makefile b/plugins/gpu_neon/psx_gpu/tests/Makefile index 21d61558..465dbb49 100644 --- a/plugins/gpu_neon/psx_gpu/tests/Makefile +++ b/plugins/gpu_neon/psx_gpu/tests/Makefile @@ -1,30 +1,29 @@ CC = $(CROSS_COMPILE)gcc -CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP +CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP -DGPU_NEON CFLAGS += -Wall -ggdb CFLAGS += -fno-strict-aliasing CFLAGS += `sdl-config --cflags` LDLIBS += `sdl-config --libs` -VPATH += .. - ifdef NEON CFLAGS += -mcpu=cortex-a8 -mfpu=neon -DNEON_BUILD ASFLAGS = $(CFLAGS) -OBJ += psx_gpu_arm_neon.o +OBJ += ../psx_gpu_arm_neon.o else CFLAGS += -DNEON_BUILD -DSIMD_BUILD -OBJ += psx_gpu_simd.o +OBJ += ../psx_gpu_simd.o endif ifndef DEBUG CFLAGS += -O2 -DNDEBUG endif -OBJ += psx_gpu.o psx_gpu_parse.o psx_gpu_main.o +OBJ += ../psx_gpu_main.o ../../../gpulib/prim.o all: psx_gpu psx_gpu: $(OBJ) + $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS) clean: $(RM) psx_gpu $(OBJ)