mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 04:19:57 -04:00
Port Ocarina of Time (Switch 2) to the recomp host
The NVN2 front end and the SM86 to Maxwell shader lowering (tools/xlate/AmpereLowering.cs, mesh and task stages, bindless texture pools, BRX jump tables, the NVN2 compute c0 layout) with four translator patches (0017-0020) bring the opening of the game to 58-60 fps on the Vulkan renderer. This round fixes the haze: SM86 IPA is lowered as a plain Maxwell IPA.PASS (texture coordinates were corrected for perspective twice); LDSM, TXD, both F2IP byte forms, HMMA, MOVM and HFMA2.RELU are lowered and spill mode has eight uniform register groups; conditional rendering keeps the newest counter report per address and treats a report as pending until its value is in guest memory, so occlusion tests and the depth clears around the depth copy behave; and the upscaler stand-in decodes the post pass's sRGB picture before writing the linear target. Tensor-core programs keep the stand-in unless NX2NAVI_NATIVE_TENSOR=1, because their lowering does not match the hardware yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,17 @@ SUBSDK0 = [ # section 0.1: asked by the movie library through nvnDeviceGetProcA
|
||||
"nvnTextureGetNvRmSurfaceNVX",
|
||||
]
|
||||
MAIN_COUNT = 534
|
||||
# NVN2 (Switch 2) procs this host implements; the rest of the NVN2 names get traps (runtime/nvn_procs.c nvn_trap).
|
||||
NVN2 = [
|
||||
"nvnCommandBufferDrawMeshTasks",
|
||||
"nvnCommandBufferDrawMeshTasksIndirect",
|
||||
"nvnCommandBufferPushComputeConstants",
|
||||
"nvnCommandBufferSetGeometryProcessingMode",
|
||||
"nvnProgramBuilderSetDefaults",
|
||||
"nvnProgramBuilderSetDevice",
|
||||
"nvnProgramBuilderSetShaders",
|
||||
"nvnProgramInitializeFromBuilder",
|
||||
]
|
||||
|
||||
|
||||
def main() -> int:
|
||||
@@ -39,7 +50,7 @@ def main() -> int:
|
||||
return 1
|
||||
# nvnDeviceGetProcAddress is in both lists; keep one row per name.
|
||||
extra_sub = [n for n in SUBSDK0 if n not in main_names]
|
||||
rows = sorted(main_names) + sorted(extra_sub)
|
||||
rows = sorted(main_names) + sorted(extra_sub) + sorted(n for n in NVN2 if n not in main_names)
|
||||
text = ("// Generated by tools/gen_nvn_procs.py: the NVN proc names of NX2navi 1.2.1.\n"
|
||||
+ "".join(f"NVN_PROC({n})\n" for n in rows))
|
||||
OUT.write_text(text, encoding="utf-8", newline="\n")
|
||||
|
||||
Reference in New Issue
Block a user