Triforce v0.8.5

A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-28 10:54:41 -06:00
parent 2df08c751e
commit b527e29adb
203 changed files with 18821 additions and 2051 deletions

View File

@@ -104,7 +104,9 @@ C_COMMENT_OR_STRING = re.compile(r'//[^\n]*|/\*.*?\*/|"(?:\\.|[^"\\\n])*"|\'(?:\
UI_RECORD_CALL = re.compile(r"\bui\s*::\s*record(?:_to)?\s*\(")
NGX_RECORD_CALL = re.compile(r"\bNGX_VULKAN_\w+_EXT\s*\(") # (NVIDIA NGX's create/evaluate: its own commands into cmd)
FFX_RECORD_CALL = re.compile(r"\bl\s*\.\s*dispatch\s*\(") # (AMD FidelityFX's ffxDispatch, through its loaded pointer: its own commands into cmd)
OPAQUE_RECORD_CALL = re.compile(UI_RECORD_CALL.pattern + "|" + NGX_RECORD_CALL.pattern + "|" + FFX_RECORD_CALL.pattern)
XESS_RECORD_CALL = re.compile(r"\bl\s*\.\s*execute\s*\(") # (Intel XeSS's xessVKExecute, through its loaded pointer: its own commands into cmd)
OPAQUE_RECORD_CALL = re.compile(UI_RECORD_CALL.pattern + "|" + NGX_RECORD_CALL.pattern + "|" + FFX_RECORD_CALL.pattern + "|" +
XESS_RECORD_CALL.pattern)
B_DIRECT_BEFORE = re.compile(r"::\s*mkwvk\s*::\s*rec\s*::\s*boundary\s*\(\s*::\s*mkwvk\s*::\s*rec\s*::\s*B_DIRECT\s*\)\s*;\Z")
@@ -155,6 +157,17 @@ def check_sources():
% (sorted(set(macros) - set(calls)), sorted(set(calls) - set(macros))))
for f, body in macros.items():
# ((Triforce, P4) the commands that do GPU work pass their arguments through RX_WORK_ON, which counts the command buffer)
# ((Triforce, 11-26, C15) a push and a bind are told to capturepushkeep.h first, in capture_keep_vk's wrappers, which
# call the packer's route with the same arguments, each evaluated once)
kept = {"vkCmdPushConstants": "push", "vkCmdBindPipeline": "bind"}.get(f)
if kept and body.strip() == "(::mkwvk::capture_keep_vk::%s(__VA_ARGS__))" % kept:
wrapper = work[work.index("inline void %s(VkCommandBuffer cmd" % kept):]
wrapper = wrapper[:wrapper.index("\n}\n")]
if "::mkwvk::rec::rx_%s(cmd, " % f not in wrapper:
problems.append("vk_work.h: %s's wrapper does not call its packer" % f)
if "::vkx::" in wrapper:
problems.append("vk_work.h: %s's wrapper calls the driver directly" % f)
continue
if "::mkwvk::rec::rx_%s(__VA_ARGS__)" % f not in body and "::mkwvk::rec::rx_%s(RX_WORK_ON(__VA_ARGS__))" % f not in body:
problems.append("vk_work.h: %s does not call its packer: %s" % (f, body))
if "::vkx::" in body:
@@ -254,6 +267,13 @@ def check_sources():
problems.append("vk_fsr4.cpp: no ffxDispatch call (l.dispatch) found: update FFX_RECORD_CALL")
elif not direct_unbounded(fsr4.replace(B_DIRECT_STMT, "", 1), "vk_fsr4.cpp", FFX_RECORD_CALL):
problems.append("the B_DIRECT check missed an ffxDispatch recording without its boundary")
# (Intel XeSS records into cmd through xessVKExecute: after a B_DIRECT boundary; control: that boundary removed)
xess = (VK / "vk_xess.cpp").read_text(encoding="utf-8")
problems += direct_unbounded(xess, "vk_xess.cpp", XESS_RECORD_CALL)
if not XESS_RECORD_CALL.search(blank_comments(xess)):
problems.append("vk_xess.cpp: no xessVKExecute call (l.execute) found: update XESS_RECORD_CALL")
elif not direct_unbounded(xess.replace(B_DIRECT_STMT, "", 1), "vk_xess.cpp", XESS_RECORD_CALL):
problems.append("the B_DIRECT check missed an xessVKExecute recording without its boundary")
# (and any other recording vk_work.h does not see must be registered: every hand-written note_work() follows a known one)
for path in sorted(VK.glob("*.cpp")):
problems += opaque_unregistered(path.read_text(encoding="utf-8"), path.name)
@@ -289,6 +309,8 @@ def build(cxx, headers, out, recorder_text, name, extra=(), work_text=None):
(d / h).write_text((VK / h).read_text(encoding="utf-8"), encoding="utf-8")
(d / "lock_census.h").write_text((VK / "lock_census.h").read_text(encoding="utf-8"), encoding="utf-8") # ((Triforce, THREAD-68) vk_recorder.h's)
(d / "new_wait.h").write_text((VK / "new_wait.h").read_text(encoding="utf-8"), encoding="utf-8") # ((Triforce, OS-04) vk_recorder.h's)
# ((Triforce, 11-26, C15) vk_recorder.h's and cmd_work.h's: the capture push a command buffer holds)
(d / "capturepushkeep.h").write_text((VK / "capturepushkeep.h").read_text(encoding="utf-8"), encoding="utf-8")
(d / "vk_recorder.h").write_text(recorder_text, encoding="utf-8")
exe = d / "recorder_sync_test.exe"
cmd = [cxx, "-std=c++20", "-O2", "-Wall", "-Wextra", "-Werror", "-Wno-unused-function", "-Wno-missing-field-initializers", "-DVK_NO_PROTOTYPES",
@@ -382,6 +404,8 @@ def exit_test(cxx, headers, out, recorder_text, name):
(d / h).write_text((VK / h).read_text(encoding="utf-8"), encoding="utf-8")
(d / "lock_census.h").write_text((VK / "lock_census.h").read_text(encoding="utf-8"), encoding="utf-8") # ((Triforce, THREAD-68) vk_recorder.h's)
(d / "new_wait.h").write_text((VK / "new_wait.h").read_text(encoding="utf-8"), encoding="utf-8") # ((Triforce, OS-04) vk_recorder.h's)
# ((Triforce, 11-26, C15) vk_recorder.h's and cmd_work.h's: the capture push a command buffer holds)
(d / "capturepushkeep.h").write_text((VK / "capturepushkeep.h").read_text(encoding="utf-8"), encoding="utf-8")
(d / "vk_recorder.h").write_text(recorder_text, encoding="utf-8")
src = str(ROOT / "tests" / "recorder_exit_test.cpp")
flags = ["-std=c++20", "-O2", "-Wall", "-Wextra", "-Werror", "-DVK_NO_PROTOTYPES", "-D_CRT_SECURE_NO_WARNINGS"]
@@ -455,7 +479,7 @@ def main():
broken(rec, "c[i].pImageInfo = e.dup(w[i].pImageInfo, w[i].descriptorCount);",
"c[i].pImageInfo = w[i].pImageInfo;", "push descriptors"), work_h, ("sync", None)),
("fallback without the drain (order)",
broken(rec, " else drain();\n t_arena.fallbacks++;", " t_arena.fallbacks++;", "fallback"), work_h, ("sync", None)),
broken(rec, " else drain();\n t_arena().fallbacks++;", " t_arena().fallbacks++;", "fallback"), work_h, ("sync", None)),
("defer: no drain before vkEndCommandBuffer",
rec, no_wait(work_h, "vkEndCommandBuffer"), (None, None)),
("defer: the replay lock let go without a drain",