cfg: Add turbo mode

Add Custom Driver cfg group
This commit is contained in:
DH 2025-03-18 21:42:24 +03:00
parent ac0a803c9e
commit e18cecb2d1
2 changed files with 12 additions and 5 deletions

View file

@ -81,6 +81,7 @@ namespace vk
#ifdef ANDROID
if (owns_loader && g_vk_loader != nullptr)
{
adrenotools_set_turbo(false);
::dlclose(g_vk_loader);
g_vk_loader = nullptr;
@ -116,7 +117,7 @@ namespace vk
#ifdef ANDROID
if (g_vk_loader == nullptr)
{
auto custom_driver_path = g_cfg.video.vk.custom_driver_path.to_string();
auto custom_driver_path = g_cfg.video.vk.driver.path.to_string();
if (!custom_driver_path.empty())
{
rsx_log.warning("Loading custom driver %s", custom_driver_path);
@ -128,7 +129,7 @@ namespace vk
auto library_name = meta["libraryName"].get<std::string>();
rsx_log.warning("Custom driver: library name %s", library_name);
auto hook_dir = g_cfg.video.vk.custom_driver_hook_dir.to_string();
auto hook_dir = g_cfg.video.vk.driver.hook_dir.to_string();
rsx_log.warning("Custom driver: hook dir %s", hook_dir);
::dlerror();
@ -144,6 +145,7 @@ namespace vk
}
else
{
adrenotools_set_turbo(g_cfg.video.vk.driver.turbo_mode.get());
rsx_log.success("Custom driver at '%s' successfully loaded", custom_driver_path);
}
}

View file

@ -194,9 +194,14 @@ struct cfg_root : cfg::node
cfg::_enum<vk_gpu_scheduler_mode> asynchronous_scheduler{ this, "Asynchronous Queue Scheduler", vk_gpu_scheduler_mode::safe };
cfg::uint<256, 65536> vram_allocation_limit{ this, "VRAM allocation limit (MB)", 65536, false };
#ifdef ANDROID
cfg::string custom_driver_path{ this, "Custom Driver Path", "", false };
cfg::string custom_driver_internal_data_dir{ this, "Custom Driver Internal Data Directory", "", false };
cfg::string custom_driver_hook_dir{ this, "Custom Driver Hook Directory", "", false };
struct driver : cfg::node
{
driver(cfg::node* _this) : cfg::node(_this, "Custom Driver") {}
cfg::string path{ this, "Path", "", false };
cfg::string internal_data_dir{ this, "Internal Data Directory", "", false };
cfg::string hook_dir{ this, "Hook Directory", "", false };
cfg::_bool turbo_mode{ this, "Turbo Mode", false, false };
} driver{ this };
struct node_workarounds : cfg::node
{