d3d12_xs: synchronous shader compilation causes 1-2.5s GPU hitches #112
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator#112
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Trwthh on GitHub · 2026-11-22 10:19 UTC · original
Bug
Shader translation + DXC compilation + PSO creation all run synchronously on first use. The console uses precompiled PSOs, so this cost doesn't exist on hardware. The emulator blocks the render thread while each new shader is translated and compiled.
Evidence (from run 33/35/42)
Impact
High. The game is not playable at the lobby due to constant multi-second freezes every time a new shader is encountered. This is especially severe during first boot and menu navigation where many new materials are loaded.
Suggested approaches
xscan --compile 1before launching a title@omonkeyz on GitHub · 2026-11-22 14:05 UTC · original
Status: both suggested approaches are now in. (1) The prelaunch shader pack (xshader_prelaunch) converts the title's shaders before launch; Fortnite is fully cached. (2) Graphics PSOs build asynchronously: pso_async returns a placeholder after 12 ms while the real PSO builds in the background. In today's headless Fortnite run, 100/100 shaders were disk hits, with 'caller blocked 0 ms in 0 waits'. Runs 33/35/42 predate both changes. Leaving this open until a lobby run re-measures the hitches (Fortnite comes after Trackmania and Terraria in the current order).