[dxvk] Add option to skip integrated GPU adapters

This commit is contained in:
Philip Rebohle 2023-11-27 04:39:24 +01:00
parent 2ed1778df9
commit 83b13e47e0
4 changed files with 24 additions and 1 deletions

View File

@ -634,3 +634,15 @@
# - True/False
# dxgi.useMonitorFallback = False
# Hide integrated graphics from applications
#
# Only has an effect when dedicated GPUs are present on the system. It is
# not recommended to use this option at all unless absolutely necessary for
# a game to work; prefer using DXVK_FILTER_DEVICE_NAME whenever possible.
#
# Supported values:
# - True/False
# dxvk.hideIntegratedGraphics = False

View File

@ -286,7 +286,12 @@ namespace dxvk {
return aRank < bRank;
});
if (m_options.hideIntegratedGraphics && numDGPU > 0 && numIGPU > 0) {
result.resize(numDGPU);
numIGPU = 0;
}
if (result.empty()) {
Logger::warn("DXVK: No adapters found. Please check your "
"device filter settings and Vulkan setup. "

View File

@ -12,6 +12,7 @@ namespace dxvk {
maxChunkSize = config.getOption<int32_t> ("dxvk.maxChunkSize", 0);
hud = config.getOption<std::string>("dxvk.hud", "");
tearFree = config.getOption<Tristate>("dxvk.tearFree", Tristate::Auto);
hideIntegratedGraphics = config.getOption<bool> ("dxvk.hideIntegratedGraphics", false);
}
}

View File

@ -36,6 +36,11 @@ namespace dxvk {
/// Forces swap chain into MAILBOX (if true)
/// or FIFO_RELAXED (if false) present mode
Tristate tearFree;
// Hides integrated GPUs if dedicated GPUs are
// present. May be necessary for some games that
// incorrectly assume monitor layouts.
bool hideIntegratedGraphics;
};
}