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:
chrg6
2026-11-10 12:02:24 -05:00
parent bfcefe6fa2
commit 9d257edf5a
4 changed files with 91 additions and 19 deletions

View File

@@ -129,6 +129,7 @@ struct GfxShader {
// (4 bits per target, the SPH omap); 0 unknown (older translations)
uint8_t carried; // 1 + the previous identity (C.prev) that translated it; 0 the
// current translator
uint8_t fresh; // translated in this process (translate_one)
};
static PlatMutex cache_lock = PLAT_MUTEX_INIT; // memory cache
@@ -1973,6 +1974,7 @@ static const GfxShader *translate_one(const Req *r, int stage, const uint8_t *co
}
in_store(s->iid, stage, control, code, r, a);
plat_inc64(&n_xlated);
s->fresh = 1;
return mem_insert(s);
}
@@ -2244,6 +2246,8 @@ void gfx_shader_counts(uint64_t *keys, uint64_t *translated) { *keys = (uint64_t
const uint8_t *gfx_shader_key(const GfxShader *s) { return s->key; }
int gfx_shader_origin(const GfxShader *s) { return s->fresh ? 2 : s->carried ? 1 : 0; }
const uint8_t *gfx_shader_input_id(const GfxShader *s) { return s->iid; }
// By input id: memory, then the disk cache under the current translator, then (xlate 1) a translation from the stored