cache compiled shaders between pso requests #60

Merged
Mavixot merged 1 commit from upstream-pr/61 into main 2026-11-23 10:20:31 +00:00
Mavixot commented 2026-11-22 23:10:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Mavixot on 2026-11-22T23:10:03Z.


caches finished vs/ps/cs shaders in memory so repeated pso requests skip translation and disk reads. bounded to 64mb/128 entries, with debug overrides bypassing the cache. synthetic warm-cache debug test dropped from ~8.3s to under 1ms for 100 requests, same dxil. build + tests pass; first-time compiles are unchanged, retail samples weren't available.

<!-- greyfinch-sync:ivall/xcl:issue:6549036860 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/61). Originally posted by [Mavixot](https://github.com/Mavixot) on 2026-11-22T23:10:03Z. --- caches finished vs/ps/cs shaders in memory so repeated pso requests skip translation and disk reads. bounded to 64mb/128 entries, with debug overrides bypassing the cache. synthetic warm-cache debug test dropped from ~8.3s to under 1ms for 100 requests, same dxil. build + tests pass; first-time compiles are unchanged, retail samples weren't available.
upstream-sync closed this pull request 2026-11-24 06:56:58 +00:00
ivall commented 2026-11-24 07:00:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T10:20:54Z.


Merged (f112834). It conflicted with #67 (wave64 programs on 32-lane GPUs), which turned console_to_dxil into console_to_dxil_for(…, split_wave64): the cache now sits there and its key has split_wave64 too (the split and native forms are different DXIL). Nice side effect: gpu_pso_e2e with the retail pack went from ~28 s to ~9 s here. Tested on Windows 11 with an RX 9070: cargo test --workspace green with the retail samples (shader pack, console DLLs, texture archive), and Unicorn Overlord reaches its title screen with everything from this round merged. Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7097811472 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/61#issuecomment-7097811472). Originally posted by [ivall](https://github.com/ivall) on 2026-11-23T10:20:54Z. --- Merged (f112834). It conflicted with #67 (wave64 programs on 32-lane GPUs), which turned `console_to_dxil` into `console_to_dxil_for(…, split_wave64)`: the cache now sits there and its key has `split_wave64` too (the split and native forms are different DXIL). Nice side effect: `gpu_pso_e2e` with the retail pack went from ~28 s to ~9 s here. Tested on Windows 11 with an RX 9070: `cargo test --workspace` green with the retail samples (shader pack, console DLLs, texture archive), and Unicorn Overlord reaches its title screen with everything from this round merged. Thanks!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!60
No description provided.