Skip to content

Commit

Permalink
[dxvk] Add config option to toggle tiler optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Feb 7, 2025
1 parent a1b6de5 commit d8e8375
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dxvk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@
# dxvk.tearFree = Auto


# Controls tiler optimizations. Enabling these will alter the behaviour of
# submission heuristics and enables some non-default behaviour in DXVK.
# This option is only intended to be changed for performance testing and
# debugging purposes.
#
# Supported values: Auto, True, False

# dxvk.tilerMode = Auto


# Assume that command lists created from deferred contexts are only used
# once. This is extremely common and may improve performance while reducing
# the amount of memory wasted if games keep their command list objects alive
Expand Down
4 changes: 3 additions & 1 deletion src/dxvk/dxvk_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ namespace dxvk {
hints.renderPassClearFormatBug = m_adapter->matchesDriver(
VK_DRIVER_ID_NVIDIA_PROPRIETARY, Version(), Version(560, 28, 3));
// On tilers we need to respect render passes some more
hints.preferRenderPassOps = m_adapter->matchesDriver(VK_DRIVER_ID_MESA_TURNIP);
bool tilerMode = m_adapter->matchesDriver(VK_DRIVER_ID_MESA_TURNIP);
applyTristate(tilerMode, m_options.tilerMode);
hints.preferRenderPassOps = tilerMode;
return hints;
}

Expand Down
1 change: 1 addition & 0 deletions src/dxvk/dxvk_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace dxvk {
zeroMappedMemory = config.getOption<bool> ("dxvk.zeroMappedMemory", false);
allowFse = config.getOption<bool> ("dxvk.allowFse", false);
deviceFilter = config.getOption<std::string>("dxvk.deviceFilter", "");
tilerMode = config.getOption<Tristate>("dxvk.tilerMode", Tristate::Auto);
}

}
3 changes: 3 additions & 0 deletions src/dxvk/dxvk_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ namespace dxvk {
/// Allows full-screen exclusive mode on Windows
bool allowFse = false;

/// Whether to enable tiler optimizations
Tristate tilerMode = Tristate::Auto;

// Device name
std::string deviceFilter;
};
Expand Down

0 comments on commit d8e8375

Please sign in to comment.