Files
VIctory/crates/victory-gpu
T
Flare bca3ecd00a GPU: a shader cache miss hands back its translation, not the entry read back (#2055)
On a miss, `shader_cache::cached` had the cache write the new entry and
then read and decoded that file to return it. The first read of a file
just written is slow where a virus scanner looks at new files: measured
here (Windows Defender on) at about 0.5 ms for an 8 KB entry and 3.3 ms
for 60 KB, against 70-85 us for a later read, which is on the order of
a 1-12 ms translation. `translate --cache` misses on every container the
first time (some 25,000), and a run misses on every shader not cached.

The converter now keeps the translation it encoded, and a miss returns
it; entries are read only on hits. A translation whose entry could not
be written is returned as made too, where it was translated a second
time before.

The new test makes the cache folder unusable and checks the translation
is made once (twice before).
bca3ecd00a · 2026-11-25 22:53:58 +01:00
History
..