mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-20 08:39:58 -04:00
Triforce v0.4.0
What was merged from NX2navi (DLSS frame generation, AMD FSR 4 in Setup builds, texture detail by video memory, sprint, volume, frame caps, safer saves, the above-60 fixes), the ultrawide HUD at the screen edges, camera speed, movies without the AV1 Video Extension, the 5120x2880 + RenoDX HDR start fix, the renderer work of 11-14 and the first float changes of the lift.
This commit is contained in:
19
third_party/a64-kit/lift/a64_rtgen.py
vendored
19
third_party/a64-kit/lift/a64_rtgen.py
vendored
@@ -33,9 +33,28 @@ def runtime_h():
|
||||
h = re.sub(r"^%s\(.*\n" % re.escape(proto), "", h, flags=re.M)
|
||||
# (every context parameter A64_NOESC, rt/a64.h: these functions keep no pointer to it)
|
||||
h = re.sub(r"([(,]\s*)GuestContext\s*\*\s*(?=(?:\w+\s*)?[,)])", r"\1GuestContext *A64_NOESC ", h)
|
||||
h = fma32_native(h)
|
||||
return "/* Generated by a64-kit/lift/a64_rtgen.py from suyu/arm64_to_c.h (GPL-2.0-or-later). Do not edit. */\n" + h
|
||||
|
||||
|
||||
# (triforce) The binary32 fused multiply-add's fast path on x86-64: suyu computes it in binary64 (three widenings, a multiply,
|
||||
# an add, a narrowing and the midpoint test), because x86-64's baseline has no FMA. The game is built for x86-64-v3 where
|
||||
# the CPU has it (nx2/build.py), and there one FMA instruction is the correctly rounded result, as on Arm. The tests that
|
||||
# decide whether the native result is kept are unchanged. -DA64_FPX_NO_FMA32: the binary64 form.
|
||||
FMA32_OLD = ("#if RECOMP_FPX_HOST == 1\n"
|
||||
" const uint64_t t = recomp_fpx_fb(__builtin_fmaf(recomp_fpx_f(a), recomp_fpx_f(b), recomp_fpx_f(z)));\n"
|
||||
"#elif RECOMP_FPX_HOST == 2\n"
|
||||
" const double s = (double)recomp_fpx_f(a) * (double)recomp_fpx_f(b) + (double)recomp_fpx_f(z);\n")
|
||||
FMA32_NEW = FMA32_OLD.replace("#if RECOMP_FPX_HOST == 1\n",
|
||||
"#if RECOMP_FPX_HOST == 1 || (RECOMP_FPX_HOST == 2 && defined(__FMA__) && !defined(A64_FPX_NO_FMA32))\n")
|
||||
|
||||
|
||||
def fma32_native(h):
|
||||
if h.count(FMA32_OLD) != 1:
|
||||
raise SystemExit("a64_rtgen: suyu's recomp_fpx_fma32 changed: update fma32_native")
|
||||
return h.replace(FMA32_OLD, FMA32_NEW)
|
||||
|
||||
|
||||
def _function(src, signature):
|
||||
"""The text of one top-level C function, from its signature to its closing brace at column 0."""
|
||||
a = src.find(signature)
|
||||
|
||||
Reference in New Issue
Block a user