psx_gpu: fix interlace mode
authornotaz <notasas@gmail.com>
Mon, 12 Nov 2012 22:53:57 +0000 (00:53 +0200)
committernotaz <notasas@gmail.com>
Mon, 12 Nov 2012 22:53:57 +0000 (00:53 +0200)
plugins/gpu_neon/psx_gpu/psx_gpu.c
plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S

index 2cba878..396d274 100644 (file)
@@ -4031,7 +4031,8 @@ void setup_sprite_untextured(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u,
  s32 v, s32 width, s32 height, u32 color)
 {
   if((psx_gpu->render_state & (RENDER_STATE_MASK_EVALUATE |
-   RENDER_FLAGS_MODULATE_TEXELS | RENDER_FLAGS_BLEND)) == 0)
+   RENDER_FLAGS_MODULATE_TEXELS | RENDER_FLAGS_BLEND)) == 0 &&
+   (psx_gpu->render_mode & RENDER_INTERLACE_ENABLED) == 0)
   {
     setup_sprite_untextured_simple(psx_gpu, x, y, u, v, width, height, color);
     return;
index 4e1e403..344331d 100644 (file)
@@ -20,6 +20,7 @@
 #define RENDER_STATE_MASK_EVALUATE                        0x20
 #define RENDER_FLAGS_MODULATE_TEXELS                      0x1
 #define RENDER_FLAGS_BLEND                                0x2
+#define RENDER_INTERLACE_ENABLED                          0x1
 
 #include "psx_gpu_offsets.h"
 
@@ -5757,6 +5758,8 @@ function(setup_sprite_untextured)
   ldrh r12, [ psx_gpu, #psx_gpu_render_state_offset ]
   tst r12, #(RENDER_STATE_MASK_EVALUATE | RENDER_FLAGS_MODULATE_TEXELS         \
     | RENDER_FLAGS_BLEND)
+  ldreqb r12, [ psx_gpu, #psx_gpu_render_mode_offset ]
+  tsteq r12, #RENDER_INTERLACE_ENABLED
   beq setup_sprite_untextured_simple
 
   stmdb sp!, { r4 - r11, r14 }