VK: add two options (workarounds)

Force FIFO present mode option is workaround for recent MESA drivers
Force primitive restart flag should also work on said drivers
This commit is contained in:
Nekotekina 2018-02-11 19:52:14 +03:00
parent fa04ff6d90
commit d2652aedd2
3 changed files with 4 additions and 2 deletions

View File

@ -299,7 +299,7 @@ namespace vk
{
if (gpu_name.find(test) != std::string::npos)
{
g_drv_no_primitive_restart_flag = true;
g_drv_no_primitive_restart_flag = !g_cfg.video.vk.force_primitive_restart;
break;
}
}

View File

@ -907,7 +907,7 @@ namespace vk
//List of preferred modes in decreasing desirability
if (g_cfg.video.vsync)
preferred_modes = { VK_PRESENT_MODE_MAILBOX_KHR };
else
else if (!g_cfg.video.vk.force_fifo)
preferred_modes = { VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_RELAXED_KHR, VK_PRESENT_MODE_MAILBOX_KHR };
bool mode_found = false;

View File

@ -361,6 +361,8 @@ struct cfg_root : cfg::node
node_vk(cfg::node* _this) : cfg::node(_this, "Vulkan") {}
cfg::string adapter{this, "Adapter"};
cfg::_bool force_fifo{this, "Force FIFO present mode"};
cfg::_bool force_primitive_restart{this, "Force primitive restart flag"};
} vk{this};