Triforce v0.8.0

Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-25 10:21:32 -06:00
parent 861702476a
commit 4fa4f9188b
881 changed files with 179428 additions and 15581 deletions

View File

@@ -0,0 +1,33 @@
"""RX_VK_SHADOW_BIAS is read once, safely across the threads that record draws.
dynamic_state() kept the shadow bias in two function statics, initialised by hand: `units < 0` meant "not read yet",
then units was set to the default before getenv/sscanf filled both. Parallel recording threads (RX_VK_PARALLEL) reach it
at once, so one thread could read units and slope while another was still writing them: a data race, and a draw could
take the 250000 default with a slope not read yet, or a half-written pair. Now both start at their defaults and the
variable is parsed in a function-local static's initializer, which C++ runs exactly once and makes visible to every
thread before they go on.
python -I -B tests/test_shadow_bias_once.py
"""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def main():
src = (ROOT / "gpu" / "vk" / "vk_draw.cpp").read_text(encoding="utf-8")
at = src.find('getenv("RX_VK_SHADOW_BIAS")')
if at < 0:
raise SystemExit("RX_VK_SHADOW_BIAS is no longer read in vk_draw.cpp: this test needs updating")
block = src[src.rfind("{", 0, src.rfind("static float units", 0, at)):at]
if "static float units" not in block:
raise SystemExit("the shadow bias statics moved: this test needs updating")
if "if (units < 0)" in block:
raise SystemExit("RX_VK_SHADOW_BIAS is read under a plain `units < 0` check: threads race on units and slope")
if "static const bool" not in block or "= [] {" not in block:
raise SystemExit("RX_VK_SHADOW_BIAS is not read in a static initializer (once, thread-safely)")
print("RX_VK_SHADOW_BIAS read once, in a static initializer")
if __name__ == "__main__":
main()