X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu%2Fpsx_gpu_4x.c;h=bd6c7a1f79efd7b84a09e01ac4f70ed2628d64ae;hb=39db3a96ec328dfc3c6f228605b6edb27b92dd68;hp=942b3d30ff266fbab7d84f1e7b7191bb47a7fe8d;hpb=a2cb152a937d0aecbf794e5ba36431e6a17b7483;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c b/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c index 942b3d30..bd6c7a1f 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c @@ -1,6 +1,10 @@ +#define select_enhancement_buf_index(psx_gpu, x) \ + ((psx_gpu)->enhancement_buf_by_x16[(u32)(x) / \ + (1024u / sizeof((psx_gpu)->enhancement_buf_by_x16))]) + #define select_enhancement_buf_ptr(psx_gpu, x) \ ((psx_gpu)->enhancement_buf_ptr + \ - ((psx_gpu)->enhancement_buf_by_x16[(x) / 16] << 20)) + (select_enhancement_buf_index(psx_gpu, x) << 20)) #if !defined(NEON_BUILD) || defined(SIMD_BUILD) @@ -233,7 +237,11 @@ void setup_sprite_16bpp_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, static void setup_sprite_untextured_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u, s32 v, s32 width, s32 height, u32 color) { - setup_sprite_untextured(psx_gpu, x, y, u, v, width * 2, height * 2, color); + width *= 2; + height *= 2; + if (width > 1024) + width = 1024; + setup_sprite_untextured(psx_gpu, x, y, u, v, width, height, color); } #define setup_sprite_blocks_switch_textured_4x(texture_mode) \