Read compute NumThreads from PSVRuntimeInfo2 #139
No reviewers
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!139
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/139/head"
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?
@Yeetbot159 on GitHub · 2026-11-22 15:14 UTC · original
Yeetbot159:yeet/psv-numthreads→main· +78 −1 · 14 files · 1 commits · closed without mergingSummary
NumThreadsX/Y/Zare the first fields ofPSVRuntimeInfo2, at offsets 36, 40 and 44 of the runtime info (the dword before that is the info size). The stage union at the start of the info is not the thread count.[numthreads]. The PSV size is used only when those preamble dwords are zero. Otherwise the translator keeps the previous 1,1,1 fallback.Test plan
cargo test -p tombox-xshader --lib cs_thread_counts -- --exact meta::tests::cs_thread_counts_reject_a_bad_group_sizepassed. The blob with stage-union dwords 8,8,1 and NumThreads 4,2,1 returns[4, 2, 1].cargo test -p tombox-xshader --test synthetic compute_numthreads -- --exact compute_numthreads_come_from_psv_when_the_preamble_is_zeropassed. Preamble[0, 8, 1, 1]wins over PSV[4, 2, 1].cargo test -p tombox-xshader --tests --no-runandcargo test -p d3d12_xs --lib --no-runcompiled. EveryShaderExtractliteral gainedpsv_numthreads: None.@omonkeyz on GitHub · 2026-11-22 15:29 UTC · original
Applied in
57b24e7(merged in9865896) with your authorship kept, thanks! I fixed a merge conflict in synthetic.rs with the #136/#137 tests and kept all of them.Pull request closed