gpu_neon: don't include vector_ops.h in the main header
[pcsx_rearmed.git] / plugins / gpu_neon / psx_gpu / psx_gpu.c
index 2cba878..b5aec14 100644 (file)
@@ -17,6 +17,9 @@
 #include <string.h>
 
 #include "common.h"
+#ifndef NEON_BUILD
+#include "vector_ops.h"
+#endif
 
 u32 span_pixels = 0;
 u32 span_pixel_blocks = 0;
@@ -515,9 +518,6 @@ void flush_render_block_buffer(psx_gpu_struct *psx_gpu)
 }
 
 
-void compute_all_gradients(psx_gpu_struct *psx_gpu, vertex_struct *a,
- vertex_struct *b, vertex_struct *c);
-
 #ifndef NEON_BUILD
 
 #define setup_gradient_calculation_input(set, vertex)                          \
@@ -2885,7 +2885,7 @@ blend_blocks_builder(textured, unblended, on);
   render_blocks_switch_block_texture_mode(4bpp),                               \
   render_blocks_switch_block_texture_mode(8bpp),                               \
   render_blocks_switch_block_texture_mode(16bpp),                              \
-  render_blocks_switch_block_texture_mode(4bpp)                                \
+  render_blocks_switch_block_texture_mode(16bpp)                               \
 
 
 render_block_handler_struct render_triangle_block_handlers[] =
@@ -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;
@@ -4250,7 +4251,7 @@ void setup_sprite_untextured_simple(psx_gpu_struct *psx_gpu, s32 x, s32 y,
   render_sprite_blocks_switch_block_texture_mode(4bpp),                        \
   render_sprite_blocks_switch_block_texture_mode(8bpp),                        \
   render_sprite_blocks_switch_block_texture_mode(16bpp),                       \
-  render_sprite_blocks_switch_block_texture_mode(4bpp)                         \
+  render_sprite_blocks_switch_block_texture_mode(16bpp)                        \
 
 
 render_block_handler_struct render_sprite_block_handlers[] =
@@ -4343,7 +4344,7 @@ void render_sprite(psx_gpu_struct *psx_gpu, s32 x, s32 y, u32 u, u32 v,
 }
 
 #define draw_pixel_line_mask_evaluate_yes()                                    \
-  if(*vram_ptr & 0x8000)                                                       \
+  if((*vram_ptr & 0x8000) == 0)                                                \
 
 #define draw_pixel_line_mask_evaluate_no()                                     \
     
@@ -5055,6 +5056,7 @@ void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram)
   memset(psx_gpu->vram_ptr, 0, sizeof(u16) * 1024 * 512);
 
   initialize_reciprocal_table();
+  psx_gpu->reciprocal_table_ptr = reciprocal_table;
 
   //    00 01 10 11
   // 00  0  4  1  5