gpu_neon: reserved bpp is 16bpp, not 4bpp
authornotaz <notasas@gmail.com>
Mon, 31 Jan 2022 00:07:25 +0000 (02:07 +0200)
committernotaz <notasas@gmail.com>
Mon, 31 Jan 2022 19:03:47 +0000 (21:03 +0200)
plugins/gpu_neon/psx_gpu/psx_gpu.c
plugins/gpu_neon/psx_gpu/psx_gpu_4x.c
plugins/gpu_neon/psx_gpu/psx_gpu_parse.c

index e113f06..a5e7aa1 100644 (file)
@@ -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[] =
@@ -4251,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[] =
index 83c6680..85e972c 100644 (file)
@@ -291,7 +291,7 @@ static void setup_sprite_untextured_4x(psx_gpu_struct *psx_gpu, s32 x, s32 y,
   render_sprite_blocks_switch_block_texture_mode_4x(4bpp),                     \\r
   render_sprite_blocks_switch_block_texture_mode_4x(8bpp),                     \\r
   render_sprite_blocks_switch_block_texture_mode_4x(16bpp),                    \\r
-  render_sprite_blocks_switch_block_texture_mode_4x(4bpp)                      \\r
+  render_sprite_blocks_switch_block_texture_mode_4x(16bpp)                     \\r
 \r
 \r
 render_block_handler_struct render_sprite_block_handlers_4x[] =\r
index ffa9b9a..3818c95 100644 (file)
@@ -45,7 +45,6 @@ void update_texture_ptr(psx_gpu_struct *psx_gpu)
 
   switch((psx_gpu->render_state_base >> 8) & 0x3)
   {
-    default:
     case TEXTURE_MODE_4BPP:
       texture_base = psx_gpu->texture_4bpp_cache[psx_gpu->current_texture_page];
 
@@ -75,6 +74,7 @@ void update_texture_ptr(psx_gpu_struct *psx_gpu)
       texture_ptr += (psx_gpu->texture_window_y >> 4) << 12;
       break;
 
+    default:
     case TEXTURE_MODE_16BPP:
       texture_base = (u8 *)(psx_gpu->vram_ptr);
       texture_base += (psx_gpu->current_texture_page & 0xF) * 128;