Added (unused) multithreaded version of copyall for P96 modes - might come in handy for some platforms, but no benefit for current ones
This commit is contained in:
parent
fa6290eede
commit
dc0a410a7e
1 changed files with 29 additions and 8 deletions
|
@ -3113,14 +3113,12 @@ static void copyall(uae_u8 *src, uae_u8 *dst)
|
||||||
__builtin_bswap16(*((uae_u16 *)(src + i)))
|
__builtin_bswap16(*((uae_u16 *)(src + i)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#else
|
#elif USE_ARMNEON
|
||||||
#ifdef USE_ARMNEON
|
|
||||||
copy_screen_16bit_swap(dst, src, picasso96_state.Width * picasso96_state.Height * 2);
|
copy_screen_16bit_swap(dst, src, picasso96_state.Width * picasso96_state.Height * 2);
|
||||||
#else
|
#else
|
||||||
copy_screen_16bit_swap_arm(dst, src, picasso96_state.Width * picasso96_state.Height * 2);
|
copy_screen_16bit_swap_arm(dst, src, picasso96_state.Width * picasso96_state.Height * 2);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
}
|
||||||
}
|
|
||||||
else if (picasso96_state.RGBFormat == RGBFB_CLUT)
|
else if (picasso96_state.RGBFormat == RGBFB_CLUT)
|
||||||
{
|
{
|
||||||
#ifdef TINKER
|
#ifdef TINKER
|
||||||
|
@ -3153,16 +3151,35 @@ static void copyall(uae_u8 *src, uae_u8 *dst)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#else
|
#elif USE_ARMNEON
|
||||||
#ifdef USE_ARMNEON
|
|
||||||
copy_screen_32bit_to_16bit_neon(dst, src, picasso96_state.Width * picasso96_state.Height * 4);
|
copy_screen_32bit_to_16bit_neon(dst, src, picasso96_state.Width * picasso96_state.Height * 4);
|
||||||
#else
|
#else
|
||||||
copy_screen_32bit_to_16bit_arm(dst, src, picasso96_state.Width * picasso96_state.Height * 4);
|
copy_screen_32bit_to_16bit_arm(dst, src, picasso96_state.Width * picasso96_state.Height * 4);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MULTITHREADED_COPYALL
|
||||||
|
static struct srcdst_t {
|
||||||
|
uae_u8 *src;
|
||||||
|
uae_u8 *dst;
|
||||||
|
} srcdst;
|
||||||
|
|
||||||
|
static int copyall_multithreaded_wrapper(void *ptr) {
|
||||||
|
copyall(srcdst.src, srcdst.dst);
|
||||||
|
if (currprefs.leds_on_screen)
|
||||||
|
picasso_statusline(srcdst.dst);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void copyall_multithreaded(uae_u8 *src, uae_u8 *dst)
|
||||||
|
{
|
||||||
|
srcdst.src = src; srcdst.dst = dst;
|
||||||
|
SDL_DetachThread(SDL_CreateThread(copyall_multithreaded_wrapper, "copyall_thread", nullptr));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool picasso_flushpixels(uae_u8 *src, int off)
|
bool picasso_flushpixels(uae_u8 *src, int off)
|
||||||
{
|
{
|
||||||
uae_u8 *src_start;
|
uae_u8 *src_start;
|
||||||
|
@ -3181,7 +3198,11 @@ bool picasso_flushpixels(uae_u8 *src, int off)
|
||||||
if (dst == NULL)
|
if (dst == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
#ifdef MULTITHREADED_COPYALL
|
||||||
|
copyall_multithreaded(src + off, dst);
|
||||||
|
#else
|
||||||
copyall(src + off, dst);
|
copyall(src + off, dst);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (currprefs.leds_on_screen)
|
if (currprefs.leds_on_screen)
|
||||||
picasso_statusline(dst);
|
picasso_statusline(dst);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue