X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu%2Fpsx_gpu.c;h=49e8c8bfe14585bb2a88a37831988ecb49b721fa;hb=c069dc1bff054b9e47ba7bdf9a2fc8344b90ea89;hp=2acfedc6d5a18e0e6d34257b4d35e7ebd37e2ede;hpb=3867c6efed8d1cd6cd40f07cd46876f59da8912f;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c index 2acfedc6..49e8c8bf 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu.c @@ -281,6 +281,7 @@ void update_texture_4bpp_cache(psx_gpu_struct *psx_gpu) while(sub_x) { texel_block = *vram_ptr; + texture_page_ptr[0] = texel_block & 0xF; texture_page_ptr[1] = (texel_block >> 4) & 0xF; texture_page_ptr[2] = (texel_block >> 8) & 0xF; @@ -2017,6 +2018,10 @@ void texture_blocks_16bpp(psx_gpu_struct *psx_gpu) #define shade_blocks_textured_false_modulated_check_dithered(target) \ + if(psx_gpu->triangle_color == 0x808080) \ + { \ + false_modulated_blocks += num_blocks; \ + } \ #define shade_blocks_textured_false_modulated_check_undithered(target) \ if(psx_gpu->triangle_color == 0x808080) \ @@ -3762,7 +3767,7 @@ void render_sprite(psx_gpu_struct *psx_gpu, s32 x, s32 y, u32 u, u32 v, RENDER_FLAGS_TEXTURE_MAP); render_state |= (psx_gpu->render_state_base & ~RENDER_STATE_DITHER); - + if((psx_gpu->render_state != render_state) || (psx_gpu->primitive_type != PRIMITIVE_TYPE_SPRITE)) { @@ -4311,6 +4316,9 @@ void render_line(psx_gpu_struct *psx_gpu, vertex_struct *vertexes, u32 flags, void render_block_fill(psx_gpu_struct *psx_gpu, u32 color, u32 x, u32 y, u32 width, u32 height) { + if((width == 0) || (height == 0)) + return; + invalidate_texture_cache_region(psx_gpu, x, y, x + width - 1, y + height - 1); #ifndef NEON_BUILD @@ -4345,6 +4353,9 @@ void render_block_copy(psx_gpu_struct *psx_gpu, u16 *source, u32 x, u32 y, u16 *vram_ptr = psx_gpu->vram_ptr + x + (y * 1024); u32 draw_x, draw_y; + if((width == 0) || (height == 0)) + return; + invalidate_texture_cache_region(psx_gpu, x, y, x + width - 1, y + height - 1); for(draw_y = 0; draw_y < height; draw_y++)