Triforce v0.6.0 "Sage Of Power"

Faster frames (the replay's memory work, held submits, helper threads, collection and capture cuts), the game letting old areas go (QueryMemoryInfo), the 0.5.2 stutter fixed, AMD RX 5000/6000 and integrated-GPU fixes, the GPU device chosen by name, the in-game menus and launcher reworked, controller, Linux and benchmark fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-20 17:06:21 -06:00
parent b0e46adb48
commit 6c7117635c
265 changed files with 26893 additions and 2549 deletions

View File

@@ -1,6 +1,6 @@
"""The Insert menu's scaling rows: the Upscaler (opts.dlss: the game's own, NVIDIA DLSS and DLAA, AMD FSR 3.1, AMD FSR 4 and
its native AA) and the Render resolution's steps for it (gpu/vk/upscaler_rows.h), their order on the Graphics tab, options
files from before still loading, and their help (why DLSS or FSR 4 is not offered, the Sharpness DLSS wants). No game or GPU
files from before still loading, and their help (why DLSS or FSR 4 is not offered, that Sharpness sharpens DLSS's 3D). No game or GPU
required.
python -I -B tests/test_upscaler_rows.py [--cxx g++]
@@ -28,28 +28,31 @@ def main():
parser.add_argument("--cxx", default="g++")
args = parser.parse_args()
menu = (ROOT / "gpu" / "vk" / "vk_menu.cpp").read_text(encoding="utf-8")
# the picture's way, top to bottom; Reflex with the frame rows
order = ['"Frame generation", &opts.framegen', '"Frame pacing", &opts.pace', '"NVIDIA Reflex", &opts.reflex',
'"Output resolution", &opts.output_res', '"Upscaler", &opts.dlss', '"DLSS model", &opts.dlss_model',
'"Render resolution", &opts.resolution',
'"Window scaling filter", &opts.upscale', '"Sharpness", &opts.sharpness']
# ((Triforce, options_version 7) the Graphics tab's groups: Upscaling (the Upscaler, the DLSS model, the Render resolution,
# Upscale before bloom, Sharpness), Anti-aliasing, Frame generation, Frame rate & latency; the Output resolution is the
# Display tab's Screen group's, before them all. The Window scaling filter is gone: the sizes choose it)
order = ['"Output resolution", &opts.output_res', 'MENU_HEADING(TAB_GRAPHICS, "Upscaling")', '"Upscaler", &opts.dlss',
'"DLSS model", &opts.dlss_model', '"Render resolution", &opts.resolution', '"Upscale before bloom", &opts.upscale_pre',
'"Sharpness", &opts.sharpness', 'MENU_HEADING(TAB_GRAPHICS, "Frame generation")', '"Frame generation", &merged.framegen',
'MENU_HEADING(TAB_GRAPHICS, "Frame rate & latency")', '"Frame pacing", &merged.pacing', '"Low latency", &merged.latency']
at = [menu.find(row) for row in order]
if -1 in at:
raise SystemExit("vk_menu.cpp: a scaling row is missing: " + order[at.index(-1)])
if at != sorted(at):
raise SystemExit("vk_menu.cpp: the scaling rows are not in the picture's order")
if '"NVIDIA DLSS", &opts.' in menu or '"AMD FSR 4", &opts.' in menu:
raise SystemExit("vk_menu.cpp: DLSS or FSR has a row of its own beside the Upscaler")
if '"NVIDIA DLSS", &opts.' in menu or '"AMD FSR 4", &opts.' in menu or "&opts.upscale," in menu:
raise SystemExit("vk_menu.cpp: DLSS or FSR has a row of its own beside the Upscaler, or the window's filter is back")
# saved options: the renamed rows keep their keys (data, so read from the source)
key = function(menu, "const char* ini_key(const Row& r) {")
for value, name in (("opts.resolution", "resolution"), ("opts.upscale", "upscaling"), ("opts.dlss", "dlss")):
for value, name in (("opts.resolution", "resolution"), ("opts.dlss", "dlss")):
if not re.search(r"&%s\)\s*return\s*\"%s\"" % (re.escape(value), name), key):
raise SystemExit("ini_key: %s is not saved as %s (an options file from before would lose it)" % (value, name))
# the menu's rules are upscaler_rows.h's, checked by behaviour in test_upscaler_rows.cpp: here only that the menu uses them
uses = {
"row_fixed": ("ur::upscaler_fixed(", "ur::resolution_fixed(", "reflex_available()", "ur::model_fixed("),
"row_shown": ("ur::upscaler_shown(dlss_built() || fsr4_built(), fsr3::supported())", "ur::model_shown(dlss_built())"),
"set_row": ("ur::step_upscaler(", "ur::step(", "ur::snap(", "row_fixed("),
"row_fixed": ("ur::upscaler_fixed(", "ur::model_fixed("),
"row_shown": ("ur::upscaler_shown(dlss_built() || fsr4_built(), fsr3::supported())", "ur::model_shown(dlss_built())",
"ur::is_dlss(up)"),
"set_row": ("ur::step_engine(", "ur::step_resolution(", "ur::snap(", "row_fixed("),
}
for name, calls in uses.items():
body = function(menu, "%s %s(" % ("void" if name == "set_row" else "bool", name))
@@ -57,22 +60,26 @@ def main():
if call not in body:
raise SystemExit("%s does not use %s (upscaler_rows.h)" % (name, call))
# the help: a row's own, then a line for the value chosen (Row::hint). The Upscaler's says why DLSS is not offered, and
# DLSS's values ask for more Sharpness (it looks softer than the game's own)
# DLSS's values that Sharpness sharpens their 3D before the HUD ((Triforce, S7) no longer "set Sharpness to around 80%",
# which was the window's sharpening, the HUD with it)
upscaler = function(menu, "const char* hn_upscaler(int v, int variant) {")
for why in ("not in this build", "RX_VK_DLSS=0", "NVIDIA RTX GPU", "newer NVIDIA driver", "runtime was not found",
"(int)dlss_why()", "RX_VK_FSR4=0", "AMD's files were not found", "no FSR 4 for this GPU", "(int)fsr4_why()"):
if why not in upscaler:
raise SystemExit("hn_upscaler: the help no longer says why DLSS or FSR is not offered (%s)" % why)
if upscaler.count("Sharpness to") < 2:
raise SystemExit("hn_upscaler: NVIDIA DLSS and DLAA do not say to set Sharpness to around 80%")
# ((Triforce, options_version 7) no upscaler's line tells the player what to set Sharpness to: that is the Sharpness row's.
# The Upscaler's lines are one per engine (DLAA reads as DLSS's), and DLSS's says Sharpness sharpens its 3D before the HUD)
resolution = function(menu, "const char* hn_resolution(int v, int variant) {")
if resolution.count("Sharpness to around 80%") < 5 or "upscaler()" not in resolution:
raise SystemExit("hn_resolution: DLSS's modes do not say to set Sharpness to around 80%, or not for the Upscaler shown")
if "Sharpness to" in upscaler or "Sharpness to" in resolution or "80%" in upscaler or "upscaler()" not in resolution:
raise SystemExit("hn_upscaler or hn_resolution: a line still asks for a Sharpness, or not for the Upscaler shown")
if upscaler.count("Sharpness sharpens its 3D before the HUD") != 1 or "v = ur::engine(v);" not in upscaler:
raise SystemExit("hn_upscaler: NVIDIA DLSS (and DLAA, its engine's line) does not say that Sharpness sharpens its 3D "
"before the HUD")
measure = function(menu, "float measure_help(ui::Ctx& c, float width) {")
if "r.hint(v, k)" not in measure:
raise SystemExit("measure_help leaves the values' lines out: the help's room would jump as a value changes")
for row, hint in (('"Upscaler", &opts.dlss', "hn_upscaler"), ('"DLSS model", &opts.dlss_model', "hn_dlss_model"), ('"Render resolution", &opts.resolution', "hn_resolution"),
('"NVIDIA Reflex", &opts.reflex', "hn_reflex"), ('"Window scaling filter", &opts.upscale', "hn_filter")):
('"Low latency", &merged.latency', "hn_latency"), ('"Frame generation", &merged.framegen', "hn_framegen_row")):
entry = menu[menu.index(row):]
if hint not in entry[:entry.index("},")]:
raise SystemExit("vk_menu.cpp: %s has no %s" % (row.split(",")[0], hint))
@@ -80,8 +87,8 @@ def main():
model = menu[menu.index('"DLSS model", &opts.dlss_model'):]
if not model[:model.index("},")].rstrip().endswith("hn_dlss_model, false, true"):
raise SystemExit("vk_menu.cpp: the DLSS model row takes a restart or turns the Quality preset to Custom")
# the Window scaling filter's sizes: only from the game's frames. The start-up screen is drawn at the window's size
# (present_image with no source): taken as the picture's, the row read "Not needed" while the output was another size
# the window's filter's sizes: only from the game's frames. The start-up screen is drawn at the window's size
# (present_image with no source): taken as the picture's, the filter would follow it
replay = (ROOT / "gpu" / "vk" / "vk_replay.cpp").read_text(encoding="utf-8")
present = function(replay, "void present_image(")
note = present.index("menu_note_present_sizes(")