mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 23:59:59 -04:00
The log says which missed pipelines were slow and why, and a slow frame that waited for a pipeline is charged to the pipeline.
A session's log gave the counts of slow pipelines and slow frames but not what they were. Now: - Each pipeline a draw missed that took 50 ms or longer to become usable gets a line (the first 48 of a run): mesh or vertex, fast-linked or built whole, whether pipeline-keys.bin named it, its shaders' input ids and where their translations came from (the shader cache, a previous translator's, or translated in this session). The summary line counts the same: how many were mesh pipelines, how many the key file named and the prebuild had not reached, how many had a shader translated in this session. - Each shader library that took 25 ms or longer gets a line (the first 32): its shader, the translation's origin, and whether outputs were added for its fragment shader, which is a module the preparation never built. - The count of draw lookups that "found shader libraries missing" says what it counts: a library not made in this process yet, not one the driver's cache lacks. - After the boot prewarm one line says how many of the recorded pipelines' shaders are a previous translator's translations, beside the pipeline cache hits that show whether any pipeline was compiled again. - The frame-time summary's "over 25 ms by cause" took the replay's whole time as one part, so every frame that waited for a pipeline, a translation or a texture upload inside the replay counted as "replay". The replay's part is now its time without those waits. gfx_shader_origin gives a translation's origin. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,9 @@ typedef struct {
|
||||
// What a frame over 25 ms spent its time on, so a count of slow frames says where to look instead of only that they
|
||||
// happened. A frame is charged to the largest part when that part is at least a quarter of it, and to "unattributed"
|
||||
// otherwise - the part of a slow frame none of the recorded waits explains (the GPU, or a stall outside them).
|
||||
// The replay's part is its time without the pipeline, translation and texture waits, which all happen inside it: with
|
||||
// them in, every frame that waited 900 ms for a pipeline was charged to "replay", the larger number, and a log
|
||||
// could not tell a pipeline stall from a slow replay.
|
||||
enum { FT_C_PIPE, FT_C_XLATE, FT_C_TEX, FT_C_FENCE, FT_C_PACE, FT_C_REPLAY, FT_C_OTHER, FT_C_N };
|
||||
static const char *const ft_cause_name[FT_C_N] = { "pipeline", "translation", "texture", "fence", "pacing", "replay",
|
||||
"unattributed" };
|
||||
@@ -380,7 +383,9 @@ static uint64_t ft_frame(uint64_t frame, uint64_t now, uint64_t d) {
|
||||
part[FT_C_TEX] = frame_ns[PERF_TEX];
|
||||
part[FT_C_FENCE] = frame_ns[PERF_FENCE] + frame_ns[PERF_DRAIN];
|
||||
part[FT_C_PACE] = frame_ns[PERF_PACE];
|
||||
part[FT_C_REPLAY] = (uint64_t)rep > 0 ? (uint64_t)rep : 0;
|
||||
part[FT_C_REPLAY] = rep > 0 ? (uint64_t)rep : 0;
|
||||
uint64_t inside = part[FT_C_PIPE] + part[FT_C_XLATE] + part[FT_C_TEX]; // waits on the replay thread
|
||||
part[FT_C_REPLAY] = part[FT_C_REPLAY] > inside ? part[FT_C_REPLAY] - inside : 0;
|
||||
uint64_t known = 0;
|
||||
for (int c = 0; c < FT_C_OTHER; c++) known += part[c];
|
||||
part[FT_C_OTHER] = d > known ? d - known : 0;
|
||||
|
||||
Reference in New Issue
Block a user