mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 12:29:57 -04:00
Prepare shaders under the code hashes play asks for, from every shader package, with better guessed bind states.
The install step seeded only 63% of the programs a play session met under their run-time code hash. A Switch 2 program with an empty c1 range past its code was hashed with that range, the Switch 2 agl and NDSR packages had no reader, and Layout2Shader/ was not walked. It now seeds 99.3% of the programs play asks for. A default variant's answers are read again from its first translation (runtime/gfx_shader_guess.c): vertex inputs the shader reads as integers become uint, and a compute shader takes the texture and image types its translation declares. Task and mesh defaults carry the workgroup words play answers with. Against a play session's recorded variants, --prepare-shaders now matches 98.3%; the plain default guess matched 89.5%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,10 @@ void gfx_shader_prepare_recorded(int threads, int procs);
|
||||
// nx2navi.exe --prepare-shaders: translates <dir>/seed-answers.bin + seed-programs.bin (tools/prepare_shaders.py) and
|
||||
// writes <dir>/shader-prepared.bin (stage, priority, input id per variant). 0 on success.
|
||||
int gfx_shader_prepare_seed(const char *dir, int threads, int procs);
|
||||
// gfx_shader_guess.c: the answers of a prepared default variant, read from its first translation s: vertex inputs the
|
||||
// shader reads as integers become uint, a compute shader's textures and images take the types its translation
|
||||
// declares. 1 when *out differs from *a (translate again with *out).
|
||||
int gfx_shader_guess_refine(const GfxShader *s, int stage, const GfxShaderAnswers *a, GfxShaderAnswers *out);
|
||||
typedef struct { uint8_t iid[32]; uint8_t stage, prio; } GfxWarmEnt; // prio 0: met in play; 1..3: prepared
|
||||
size_t gfx_shader_warm_list(GfxWarmEnt **out); // malloc'd; recorded first, then prepared; needs recording on
|
||||
// Disk-cache load the caller owns (*owned 1: release it), or the memory cache's entry (*owned 0). NULL if not cached.
|
||||
|
||||
Reference in New Issue
Block a user