Skip to content

Use runtime shader settings when warming the disk cache - #6

Open
timorjay wants to merge 1 commit into
realblastex:mainfrom
timorjay:warm-listed-shaders
Open

timorjay wants to merge 1 commit into
realblastex:mainfrom
timorjay:warm-listed-shaders

Conversation

@timorjay

Copy link
Copy Markdown

Offline warm-up and live cache misses use the same cache key. A live miss selects the shader-specific wave settings in translate_listed, while warm called the generic translator directly. A cache previously filled by victory translate --warm could therefore change the shader used at first use.

This routes a warm-up miss through the same helper as a live miss. The cache already fingerprints this source file, so existing entries get a new key.

On bd552a5 I compared the full HostShader (DXIL bytes and metadata) from a live miss with the result of warming a fresh cache and then calling the live path. With a 32-lane host configuration, VICTORY_SHADER_OPT=0, and the default per-shader lists, three of eight local inputs differed before the change. The inputs below are identified by the hashes already listed in the source.

Shader Live miss, bytes Live read after unpatched warm-up, bytes
369cbe906ea72764 15,068 28,072
5dc3b25986622949 103,976 201,344
6f225b641c5b0708 160,356 325,112

After the change all eight comparisons matched byte for byte, and a second warm-up read each entry from disk. The four existing shader_cache::tests passed. The PR contains one production-line change. The comparison measures cache correctness. The test inputs stayed local.

Tested with Codex assistance.

@realblastex

realblastex commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Thank you @timorjay, that's a great catch, and the byte-for-byte comparison makes it easy to trust. I'd been warming the cache with translate --warm before test runs, so those runs used the generic translation for exactly the listed shaders. The fix is in my dev branch; this PR gets merged from the GitHub side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants