mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
The texture pool descriptors are now a ring of sets, one per submission, brought up to date from a change log, and the first submission of each frame waits for its GPU work before the game goes on: the GPU ran late and part of a frame read data of the next one, and distant characters drew NaN that bloom spread over the frame. The window acquire also waits for the image's previous frame. Function locals start at zero unless DLAA is on, which removes the per-warp light tiles on the Great Fairy Fountain floor and Link's dark, speckled look. Texture slots follow only live entries of their own target, so the volumetric fog gets its 3D volume. The pool refresh walks only the slots that changed. The translator implements PRMT (patch 0021), which it only logged before; the button prompts render again. HFMA2.RELU no longer depends on it, HMMA.F16 rounds once and HMMA.F32 is lowered, checked against GPU vectors with a new Maxwell warp emulator. The frame dump gains a re-arming white-frame trigger, a trigger on a depth target's first pass, NaN pixels in magenta, image handles and view targets, and depth copies of sampled depth textures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
1.4 KiB
C
24 lines
1.4 KiB
C
// NX2NAVI_FLIGHT=1 flight recorder (flight.c): the last frames' timing and event counts plus a thumbnail each, written to
|
|
// disk on F8 or after a slow frame, so a glitch or stutter seen in play can be read after the fact.
|
|
#pragma once
|
|
#include <stdint.h>
|
|
|
|
#define FLIGHT_THUMB_W 320
|
|
#define FLIGHT_THUMB_H 180
|
|
|
|
extern int flight_on;
|
|
extern int vk_dump_white; // vk_dump.c, NX2NAVI_DUMP_WHITE // NX2NAVI_FLIGHT=1, set once by flight_init before the first present
|
|
|
|
void flight_init(void); // prof_start calls it
|
|
// perf_present, once per present on the render thread: the interval since the previous present, the render thread's
|
|
// blocked time per PERF_* kind in this frame, and the running PERF_CNT_* totals.
|
|
void flight_frame(uint64_t frame, uint64_t now_ns, uint64_t interval_ns, const uint64_t blocked_ns[],
|
|
const volatile int64_t counts[]);
|
|
|
|
// gfx_present.c: the present thread blits every presented frame into a host-visible ring of n thumbnails.
|
|
void vk_thumbs_enable(int n); // before the first present; n slots of FLIGHT_THUMB_W x FLIGHT_THUMB_H
|
|
void vk_thumbs_frame(uint64_t frame); // the present thread names the frame of the vk_present_image call that follows
|
|
// Copies frame's thumbnail as RGBA when the ring still holds it complete; 0 when it was never written, is still in
|
|
// flight or was overwritten. Takes the present lock for one slot copy (about 20 us); any thread.
|
|
int vk_thumbs_read(uint64_t frame, uint8_t *rgba);
|