mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 08:39:57 -04:00
Make F8 write a bug capture and add a test run that starts from one.
F8 now always writes a folder under logs/captures: the area, Link's position and rotation, the camera of the frame on screen and the game's own, the presented frame as a PNG, frame times around the press, the machine, the settings that differ from the defaults, the end of the log, the save, and the game's flags and texts. A note on screen names the capture. The flight recorder's F8 dump goes into the capture's folder. NX2NAVI_CAPTURE_REPLAY starts a run on a capture's settings, teleports to its area, walks Link to where he stood and puts the free camera where the camera was; tools/capture_run.py prepares the profile from the capture's save, runs it and compares the two captures. docs/bug-capture.md has the files and the steps. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 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.
|
||||
// disk with a bug capture (F8, bugcap.c) or after a slow frame, so a glitch or stutter seen in play can be read after the fact.
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -14,6 +14,9 @@ void flight_init(void); // prof_start calls it
|
||||
// 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[]);
|
||||
// A bug capture at this frame (the render thread, before or after flight_frame): the recorder dumps the frames around
|
||||
// it into dir. 0 when the recorder is off or busy with another dump.
|
||||
int flight_capture(uint64_t frame, uint64_t interval_ns, const char *dir);
|
||||
|
||||
// Texture events of the recorded frames (vk_texture.c), written with each dump as events.tsv: a texture made (with how
|
||||
// its content started), uploaded, uploaded again, released by the game, taken back after a release, or destroyed. Each
|
||||
@@ -45,6 +48,9 @@ void flight_tex(int kind, uint64_t addr, uint32_t format, uint32_t w, uint32_t h
|
||||
const char *vk_texture_start_name(int start); // vk_texture.c: the names of Tex.og_start and of drop_tex's reasons
|
||||
const char *vk_texture_drop_name(int why);
|
||||
|
||||
// A w x h RGBA picture as a compressed RGB PNG (Paeth rows, fixed-Huffman deflate); any thread, recorder on or off.
|
||||
int flight_write_png(const char *path, const uint8_t *rgba, uint32_t w, uint32_t h);
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user