From b7f5c059b7f60b521424d47a5117c3bdc20f8551 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 31 Jan 2022 02:07:25 +0200 Subject: [PATCH] gpu_neon: reserved bpp is 16bpp, not 4bpp --- plugins/gpu_neon/psx_gpu/psx_gpu.c | 4 ++-- plugins/gpu_neon/psx_gpu/psx_gpu_4x.c | 2 +- plugins/gpu_neon/psx_gpu/psx_gpu_parse.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c index e113f064..a5e7aa18 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu.c @@ -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[] = diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c b/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c index 83c6680f..85e972c5 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_4x.c @@ -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), \ render_sprite_blocks_switch_block_texture_mode_4x(8bpp), \ render_sprite_blocks_switch_block_texture_mode_4x(16bpp), \ - render_sprite_blocks_switch_block_texture_mode_4x(4bpp) \ + render_sprite_blocks_switch_block_texture_mode_4x(16bpp) \ render_block_handler_struct render_sprite_block_handlers_4x[] = diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c index ffa9b9a0..3818c95d 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c @@ -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; -- 2.39.2