mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 20:09: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:
@@ -143,6 +143,7 @@ uint32_t mem_set_attribute(uint64_t a, uint64_t n, uint32_t mask, uint32_t at);
|
||||
uint32_t mem_map(uint64_t dst, uint64_t src, uint64_t n); // 0x04
|
||||
uint32_t mem_unmap(uint64_t dst, uint64_t src, uint64_t n); // 0x05
|
||||
uint32_t mem_query(uint64_t a, RtMemoryInfo *out); // 0x06
|
||||
int mem_readable(uint64_t a, uint64_t n); // every page readable
|
||||
uint32_t mem_map_physical(uint64_t a, uint64_t n); // 0x2C
|
||||
uint32_t mem_unmap_physical(uint64_t a, uint64_t n); // 0x2D
|
||||
int mem_info(uint32_t id, uint64_t *out); // GetInfo memory ids 2-7, 12-17, 21, 22, 28; 0 if not a memory id
|
||||
@@ -187,6 +188,8 @@ typedef struct { const char *file, *sha256; } RtFileHash;
|
||||
extern const RtFileHash rt_exefs_sha256[]; // tools/data/expected-<version>.json "exefs_sha256"
|
||||
extern const int rt_exefs_sha256_count;
|
||||
extern const char rt_default_exefs[], rt_default_romfs[], rt_default_profile[];
|
||||
extern const unsigned long long rt_app_pool_bytes; // the title's application memory pool (GetInfo 6)
|
||||
extern const int rt_nvn_api_version[2]; // NVN_DEVICE_INFO_API_{MAJOR,MINOR}_VERSION the title requires
|
||||
extern const int rt_game_version; // the game build: 110 (1.1.0), 121 (1.2.1) or 143 (1.4.3)
|
||||
extern const char rt_port_version[]; // VERSION at the build's root: 0.1.0, 0.1.0+973c626 in a release
|
||||
#define RT_V110 (rt_game_version == 110) // 1.1.0: its own boot constants and data slots
|
||||
@@ -225,8 +228,10 @@ enum { KERN_SESSION = 4, KERN_TMEM = 5 };
|
||||
uint32_t kern_event_new(void); // writable handle
|
||||
uint32_t kern_event_readable(uint32_t writable);
|
||||
void kern_event_signal(uint32_t writable);
|
||||
void kern_event_clear(uint32_t writable); // server-side clear (e.g. a drained message queue)
|
||||
void kern_bind_system_event(Cpu *c, uint64_t ev, int autoclear); // guest thread only
|
||||
void kern_signal_system_event(uint64_t ev); // any thread
|
||||
void kern_clear_system_event(uint64_t ev); // any thread; a bound, live event only
|
||||
int kern_svc(Cpu *c, uint32_t imm); // thread/sync SVCs; 1 if handled
|
||||
uint64_t kern_now_ns(void);
|
||||
extern uint64_t rt_guest_start_ns; // kern_now_ns when the guest started (boot.c), 0 before
|
||||
|
||||
Reference in New Issue
Block a user