mirror of
https://github.com/simple64/simple64.git
synced 2026-07-11 01:24:00 +02:00
update parallel rdp
This commit is contained in:
@@ -256,17 +256,26 @@ EXPORT void CALL FullSync(void)
|
||||
vk_full_sync();
|
||||
}
|
||||
|
||||
static void setup_netplay()
|
||||
{
|
||||
m64p_error netplay_init = ConfigReceiveNetplayConfig(NULL, 0); // A bit of a hack to determine if netplay is enabled
|
||||
if (netplay_init != M64ERR_NOT_INIT)
|
||||
{
|
||||
DebugMessage(M64MSG_INFO, "Netplay enabled, disabling vsync");
|
||||
vk_synchronous = 1; // force synchronous rdp during netplay
|
||||
window_vsync = 0; // force disable vsync during netplay
|
||||
vk_ssreadbacks = 0; // can cause desyncs
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT int CALL RomOpen(void)
|
||||
{
|
||||
window_fullscreen = ConfigGetParamBool(configVideoParallel, KEY_FULLSCREEN);
|
||||
window_width = ConfigGetParamInt(configVideoParallel, KEY_SCREEN_WIDTH);
|
||||
window_height = ConfigGetParamInt(configVideoParallel, KEY_SCREEN_HEIGHT);
|
||||
window_widescreen = ConfigGetParamBool(configVideoParallel, KEY_WIDESCREEN);
|
||||
m64p_error netplay_init = ConfigReceiveNetplayConfig(NULL, 0); // A bit of a hack to determine if netplay is enabled
|
||||
if (netplay_init != M64ERR_NOT_INIT)
|
||||
window_vsync = 0; // force disable vsync during netplay
|
||||
else
|
||||
window_vsync = ConfigGetParamBool(configVideoParallel, KEY_VSYNC);
|
||||
window_vsync = ConfigGetParamBool(configVideoParallel, KEY_VSYNC);
|
||||
|
||||
vk_rescaling = ConfigGetParamInt(configVideoParallel, KEY_UPSCALING);
|
||||
if (vk_rescaling > 4)
|
||||
vk_rescaling = 4;
|
||||
@@ -287,11 +296,9 @@ EXPORT int CALL RomOpen(void)
|
||||
vk_downscaling_steps = ConfigGetParamInt(configVideoParallel, KEY_DOWNSCALE);
|
||||
vk_overscan = ConfigGetParamInt(configVideoParallel, KEY_OVERSCANCROP);
|
||||
vk_vertical_stretch = ConfigGetParamInt(configVideoParallel, KEY_VERTICAL_STRETCH);
|
||||
vk_synchronous = ConfigGetParamBool(configVideoParallel, KEY_SYNCHRONOUS);
|
||||
|
||||
if (netplay_init != M64ERR_NOT_INIT)
|
||||
vk_synchronous = 1; // force synchronous rdp during netplay
|
||||
else
|
||||
vk_synchronous = ConfigGetParamBool(configVideoParallel, KEY_SYNCHRONOUS);
|
||||
setup_netplay();
|
||||
|
||||
plugin_init();
|
||||
if (vk_init()) {
|
||||
|
||||
@@ -533,10 +533,13 @@ bool vk_init()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (vk_rescaling > 1 && vk_ssreadbacks)
|
||||
flags |= RDP::COMMAND_PROCESSOR_FLAG_SUPER_SAMPLED_READ_BACK_BIT;
|
||||
if (vk_ssdither)
|
||||
flags |= RDP::COMMAND_PROCESSOR_FLAG_SUPER_SAMPLED_DITHER_BIT;
|
||||
if (vk_rescaling > 1)
|
||||
{
|
||||
if (vk_ssreadbacks)
|
||||
flags |= RDP::COMMAND_PROCESSOR_FLAG_SUPER_SAMPLED_READ_BACK_BIT;
|
||||
if (vk_ssdither)
|
||||
flags |= RDP::COMMAND_PROCESSOR_FLAG_SUPER_SAMPLED_DITHER_BIT;
|
||||
}
|
||||
|
||||
processor = new RDP::CommandProcessor(wsi->get_device(), reinterpret_cast<void *>(aligned_rdram),
|
||||
offset, rdram_size, rdram_size / 2, flags);
|
||||
|
||||
Reference in New Issue
Block a user