mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
Merge 4685e4c619a4f65cde5f73ea67902f90c18a900f into c04410ca00f33162d0875bc8500d3f8185bc73df
This commit is contained in:
commit
549b47e316
13
dxvk.conf
13
dxvk.conf
@ -656,6 +656,19 @@
|
||||
|
||||
# d3d9.forceAspectRatio = ""
|
||||
|
||||
# Force Mode Heights
|
||||
#
|
||||
# Only exposes modes with certain heights, if they are
|
||||
# also supported by the adapter. Can be used in conjunction
|
||||
# with forceAspectRatio to further restrict reported modes.
|
||||
# Useful for titles that break when too many modes are reported,
|
||||
# e.g., AquaNox, AquaNox 2: Revelation.
|
||||
#
|
||||
# Supported values:
|
||||
# - A list of mode heights, i.e. "480,720,1080"
|
||||
|
||||
# d3d9.forceModeHeights = ""
|
||||
|
||||
# Enumerate by Displays
|
||||
#
|
||||
# Whether we should enumerate D3D9 adapters by display (windows behaviour)
|
||||
|
@ -44,6 +44,16 @@ namespace dxvk {
|
||||
m_modeCacheFormat (D3D9Format::Unknown),
|
||||
m_d3d9Formats (Adapter, m_parent->GetOptions()) {
|
||||
m_adapter->logAdapterInfo();
|
||||
|
||||
auto& options = m_parent->GetOptions();
|
||||
|
||||
if (!options.forceModeHeights.empty()) {
|
||||
uint32_t forcedHeight = 0;
|
||||
for (auto height : str::split(options.forceModeHeights, ",")) {
|
||||
std::from_chars(height.data(), height.data() + height.size(), forcedHeight);
|
||||
m_forcedModeHeights.emplace_back(forcedHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <size_t N>
|
||||
@ -835,6 +845,12 @@ namespace dxvk {
|
||||
if (!forcedRatio.undefined() && Ratio<DWORD>(devMode.width, devMode.height) != forcedRatio)
|
||||
continue;
|
||||
|
||||
if (!m_forcedModeHeights.empty() &&
|
||||
std::find(m_forcedModeHeights.begin(),
|
||||
m_forcedModeHeights.end(),
|
||||
devMode.height) == m_forcedModeHeights.end())
|
||||
continue;
|
||||
|
||||
D3DDISPLAYMODEEX mode = ConvertDisplayMode(devMode);
|
||||
// Fix up the D3DFORMAT to match what we are enumerating
|
||||
mode.Format = static_cast<D3DFORMAT>(Format);
|
||||
|
@ -107,6 +107,8 @@ namespace dxvk {
|
||||
|
||||
const D3D9VkFormatTable m_d3d9Formats;
|
||||
|
||||
std::vector<uint32_t> m_forcedModeHeights;
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -64,6 +64,7 @@ namespace dxvk {
|
||||
this->forceSwapchainMSAA = config.getOption<int32_t> ("d3d9.forceSwapchainMSAA", -1);
|
||||
this->forceSampleRateShading = config.getOption<bool> ("d3d9.forceSampleRateShading", false);
|
||||
this->forceAspectRatio = config.getOption<std::string> ("d3d9.forceAspectRatio", "");
|
||||
this->forceModeHeights = config.getOption<std::string> ("d3d9.forceModeHeights", "");
|
||||
this->enumerateByDisplays = config.getOption<bool> ("d3d9.enumerateByDisplays", true);
|
||||
this->cachedDynamicBuffers = config.getOption<bool> ("d3d9.cachedDynamicBuffers", false);
|
||||
this->deviceLocalConstantBuffers = config.getOption<bool> ("d3d9.deviceLocalConstantBuffers", false);
|
||||
|
@ -99,6 +99,9 @@ namespace dxvk {
|
||||
/// Forced aspect ratio, disable other modes
|
||||
std::string forceAspectRatio;
|
||||
|
||||
/// Restrict modes based on height
|
||||
std::string forceModeHeights;
|
||||
|
||||
/// Always use a spec constant to determine sampler type (instead of just in PS 1.x)
|
||||
/// Works around a game bug in Halo CE where it gives cube textures to 2d/volume samplers
|
||||
bool forceSamplerTypeSpecConstants;
|
||||
|
Loading…
x
Reference in New Issue
Block a user