X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fgpu_neon%2Fpsx_gpu_if.c;h=30faee256b06e92b525f95140050367fd7359c77;hb=308c6e678a2f0a56a9dee35307070550354f580c;hp=ad017614b527758764a22177704643556063f358;hpb=77e34391a6b3c8ae59768a941037451b7c81169f;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index ad017614..30faee25 100644 --- a/plugins/gpu_neon/psx_gpu_if.c +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -31,11 +31,20 @@ int do_cmd_list(uint32_t *list, int count, int *last_cmd) { int ret; +#if defined(__arm__) && defined(NEON_BUILD) && !defined(SIMD_BUILD) + // the asm doesn't bother to save callee-save vector regs, so do it here + __asm__ __volatile__("":::"q4","q5","q6","q7"); +#endif + if (gpu.state.enhancement_active) ret = gpu_parse_enhanced(&egpu, list, count * 4, (u32 *)last_cmd); else ret = gpu_parse(&egpu, list, count * 4, (u32 *)last_cmd); +#if defined(__arm__) && defined(NEON_BUILD) && !defined(SIMD_BUILD) + __asm__ __volatile__("":::"q4","q5","q6","q7"); +#endif + ex_regs[1] &= ~0x1ff; ex_regs[1] |= egpu.texture_settings & 0x1ff; return ret; @@ -43,7 +52,7 @@ int do_cmd_list(uint32_t *list, int count, int *last_cmd) #define ENHANCEMENT_BUF_SIZE (1024 * 1024 * 2 * 4 + 4096 * 2) -static uint16_t *get_enhancement_bufer(int *x, int *y, int *w, int *h, +static void *get_enhancement_bufer(int *x, int *y, int *w, int *h, int *vram_h) { uint16_t *ret = select_enhancement_buf_ptr(&egpu, *x); @@ -133,7 +142,7 @@ void renderer_sync_ecmds(uint32_t *ecmds) void renderer_update_caches(int x, int y, int w, int h) { update_texture_cache_region(&egpu, x, y, x + w - 1, y + h - 1); - if (gpu.state.enhancement_active && !gpu.status.rgb24) + if (gpu.state.enhancement_active && !(gpu.status & PSX_GPU_STATUS_RGB24)) sync_enhancement_buffers(x, y, w, h); }