Triforce v0.9.0

Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-30 20:55:14 -06:00
parent 8cb23131f9
commit 822ee913bc
86 changed files with 8128 additions and 438 deletions

View File

@@ -1,12 +1,13 @@
"""Threaded rendering (gpu/vk/threaded_rendering.h, vk_main.cpp threaded_choice; no game/GPU).
The rule is compiled from the header and run on made-up PCs: Off (the row's default, 0) and any value that is none of the row's are
The rule is compiled from the header and run on made-up PCs: Off (0) and any value that is none of the row's are
off whatever the CPU; On is both threads whatever the CPU; Auto is both threads from 4 physical cores and off below, off where the
run is not safe, and with no buffer-pool mirrors the recorder thread alone from 6 cores, off below. RX_VK_THREADED's words. The
source: the row is on the Debug tab with Off first, async_on reads the render thread's half only with RX_VK_ASYNC unset, the
recorder's half goes through recorder_auto in pick_device, and the host asks HOS_OPT_RENDER_THREAD only with RX_VK_ASYNC unset.
(11-27) The recorder's hand-off by part is not Threaded rendering's: RX_VK_RECORDER_PARTS=1 alone turns it on (with it the 3D was
drawn with wrong textures on the lab's RX 7900 XT, in v0.8.3 too).
drawn with wrong textures on the lab's RX 7900 XT, in v0.8.3 too). (11-29) The row is Auto (2) by default: a new options
file's, and an older file's (before options_version 11) Off turned into Auto once, at menu_init; the file is written as 11.
python -I -B tests/test_threaded_rendering.py [--cxx clang++]
"""
@@ -69,8 +70,19 @@ def check_source():
menu_h = (ROOT / "gpu/vk/vk_menu.h").read_text(encoding="utf-8")
replay = (ROOT / "gpu/vk/vk_replay.cpp").read_text(encoding="utf-8")
backend = (ROOT / "host/rx_backend.c").read_text(encoding="utf-8")
if "int threaded_rendering = 0;" not in menu_h:
fail("the row's default is no longer Off (0)")
if "int threaded_rendering = 2;" not in menu_h:
fail("the row's default is no longer Auto (2)")
# ((Triforce, 11-29) an older file wrote the old Off default whether chosen or not: its Off becomes Auto once, at the start,
# before threaded_choice reads the row; On or Auto chosen stays, and a file of 11 on keeps what was chosen)
init = menu[menu.index("void menu_init() {"):]
init = init[:init.index("\n}\n")]
if "if (version < 11 && opts.threaded_rendering == 0) opts.threaded_rendering = 2;" not in init:
fail("menu_init no longer turns an older file's Off into Auto")
save = menu[menu.index("void save() {"):]
if 'out += "options_version=11\\n";' not in save[:save.index("\n}\n")]:
fail("save no longer writes options_version=11 (an older file's Off would become Auto at every start)")
if "threaded_choice() {" in menu or "opts.threaded_rendering =" in main:
fail("the row is set somewhere other than menu_init and the menu")
if '{TAB_DEBUG, "Threaded rendering", &opts.threaded_rendering, 0, 2, 1, tx_threaded,' not in menu:
fail("the Threaded rendering row moved or changed")
pick = main[main.index("bool pick_device() {"):main.index("bool create_device() {")]
@@ -85,13 +97,15 @@ def check_source():
fail("async_on no longer reads the row only with RX_VK_ASYNC unset")
rec = (ROOT / "gpu/vk/vk_recorder.h").read_text(encoding="utf-8")
internal = (ROOT / "gpu/vk/vk_internal.h").read_text(encoding="utf-8")
# the design's other pieces: each off unless Threaded rendering (or its own switch) turns it on
# the design's other pieces: each off unless Threaded rendering (or its own switch) turns it on ((Triforce, 11-29) but the
# parts, which NVIDIA's driver has by default too: barrier_rules.h part_pass_end_default, by the device's driver id)
for needle, where in (
('g_parts.store(pe && *pe ? atoi(pe) != 0 : g_parts_default && g_parts_default(), std::memory_order_relaxed);', rec),
("if (!g_parts.load(std::memory_order_relaxed)) return;", rec), # (queue_lock_event: nothing without the hand-off)
("const bool rec_parts_hooks = (::mkwvk::queue_lock_hook = ::mkwvk::rec::queue_lock_event, true);", replay),
("const bool post = rec::parts_wanted() && r.pieces.empty() && !memory_lazy_running();", replay),
('v.on = e && *e ? atoi(e) != 0 : threaded_on() && !getenv("RX_VK_CHUNK");', replay),
("const bool by_default = threaded_on() || barrier_rules::part_pass_end_default((uint32_t)dev.driver_id);", replay),
('v.on = e && *e ? atoi(e) != 0 : by_default && !getenv("RX_VK_CHUNK");', replay),
("const bool v = e && *e ? atoi(e) == 1 : threaded_on();", replay),
("static const bool v = threaded_on();", replay),
("QueueMutex present_mu;", internal)):
@@ -129,8 +143,8 @@ def main():
done = subprocess.run([str(exe)], capture_output=True, text=True, timeout=60, creationflags=flags)
if done.returncode or done.stdout.strip() != "OK":
fail((done.stdout + done.stderr).strip())
print("PASS: Threaded rendering: Off by default and as before, On both threads, Auto by physical cores (the recorder alone "
"without mirrors from 6); the row, the readers and the host's question in place")
print("PASS: Threaded rendering: Auto by default (an older file's Off once), Off as before, On both threads, Auto by physical "
"cores (the recorder alone without mirrors from 6); the row, the readers and the host's question in place")
if __name__ == "__main__":