Read compute NumThreads from PSVRuntimeInfo2 #139
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/139"
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?
Imported from omonkeyz/xbox-emulator. Originally posted by Yeetbot159 on 2026-11-22T15:14:29Z.
Summary
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.Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T15:29:01Z.
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