X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu%2Fpsx_gpu_parse.c;h=87d8c38b722fa6909999f728dc661459202cbd6a;hb=70575e81838e2c8d842dd28c3fc7fbb91b395061;hp=a364eef3f01af30f8f488278929a2d04967834e7;hpb=a084eccd6fda714520f41a09774576e2f5053575;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c index a364eef3..87d8c38b 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c @@ -435,7 +435,10 @@ u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size, u32 *last_command) num_vertexes++; if(list_position >= list_end) - break; + { + current_command = (u32)-1; + goto breakloop; + } xy = *list_position; if((xy & 0xF000F000) == 0x50005000) @@ -496,7 +499,10 @@ u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size, u32 *last_command) num_vertexes++; if(list_position >= list_end) - break; + { + current_command = (u32)-1; + goto breakloop; + } color = list_position[0]; if((color & 0xF000F000) == 0x50005000) @@ -774,9 +780,7 @@ u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size, u32 *last_command) } } -#ifdef PCSX breakloop: -#endif if (last_command != NULL) *last_command = current_command; return list - list_start; @@ -864,7 +868,72 @@ extern void scale2x_tiles8(void *dst, const void *src, int w8, int h); #ifndef NEON_BUILD // TODO? -void scale2x_tiles8(void *dst, const void *src, int w8, int h) {} +void scale2x_tiles8(void *dst, const void *src, int w8, int h) +{ + uint16_t* d = (uint16_t*)dst; + const uint16_t* s = (const uint16_t*)src; + + while ( h-- ) + { + uint16_t* d_save = d; + const uint16_t* s_save = s; + int w = w8; + + while ( w-- ) + { + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + + d[ 0 ] = *s; + d[ 1 ] = *s; + d[ 1024 ] = *s; + d[ 1025 ] = *s; + d += 2; s++; + } + + d = d_save + 2048; + s = s_save + 1024; /* or 512? */ + } +} #endif static int disable_main_render; @@ -1193,7 +1262,10 @@ u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size, num_vertexes++; if(list_position >= list_end) - break; + { + current_command = (u32)-1; + goto breakloop; + } xy = *list_position; if((xy & 0xF000F000) == 0x50005000) @@ -1259,7 +1331,10 @@ u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size, num_vertexes++; if(list_position >= list_end) - break; + { + current_command = (u32)-1; + goto breakloop; + } color = list_position[0]; if((color & 0xF000F000) == 0x50005000)