gpu_neon: enforce alignment required for asm
[pcsx_rearmed.git] / plugins / gpu_neon / psx_gpu_if.c
index ea98ade..a1476f4 100644 (file)
@@ -143,6 +143,9 @@ sync_enhancement_buffers(int x, int y, int w, int h)
     x2 = min(right, s->x + s_w);
     y1 = max(y, s->y);
     y2 = min(bottom, s->y + s_h);
+    // 16-byte align for the asm version
+    x2 += x1 & 7;
+    x1 &= ~7;
     scale2x_tiles8(dst + y1 * 1024*2 + x1 * 2,
         src + y1 * 1024 + x1, (x2 - x1 + 7) / 8u, y2 - y1);
   }