Skip to content

Commit

Permalink
VK: add two options (workarounds)
Browse files Browse the repository at this point in the history
Force FIFO present mode option is workaround for recent MESA drivers
Force primitive restart flag should also work on said drivers
  • Loading branch information
Nekotekina committed Feb 11, 2018
1 parent fa04ff6 commit d2652ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/VK/VKHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/VK/VKHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions rpcs3/Emu/System.h
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down

0 comments on commit d2652ae

Please sign in to comment.