xshader: resolve inline compute root SRVs by the actual root parameter #252
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/252"
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 brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T17:16:18Z.
Candidate for the t5 space3 vs t1 space3 mismatch reported by @gtb-sbe in #233. The inline raw SRV path previously took the register from FSSM/PSV, even when the pipeline root assigned the same physical parameter to a different register. The complete local descriptor construction also selected the single PSV resource without checking the actual root.
For compute with an explicit root, resolve the physical argument only when a unique FSSM used-resource row, independent user-data record and raw PSV row corroborate the root parameter and SGPR. Use the actual root SRV register and space. Do not overwrite another resource's name when spaces differ. Root-less and other-stage paths are unchanged. Missing or conflicting metadata cannot justify a remap.
Validation (base
cfc56eb):I do not have the two recorded shader/root pairs from #233. This fixes a reproduced mechanism matching their reported register discrepancy, not proof that those title shaders now work. If convenient, please test this patch against those two local captured pairs, particularly whether the emitted SRV matches the actual root and DXC/vkd3d accept it. No title files needed in the PR. Independent of provider selection-order work and #241/#246 sampler changes. Draft pending review and additional validation.
Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-26T19:39:27Z.
@Valdi320 I tested #252 offline against the two captured pairs from #233.
Result:
both programs (
081be2a8and6b9780f3, root7e366593) now declare the root SRV ast1, space3instead oft5, space3. Every register they declare is now in their captured root. Before the patch,t5, space3was the only register missing from the root, which matches theFailed to remap SRV 3:5vkd3d reported in our run 12. The result is the same atb141cbd, with the patch applied tomainf0ffa49, and on your combined branch0b86078.cs_6_0, using the runtime'scompile_dxilflags; nixpkgs DXC 1.10.2605.37 on Linux).34f0ff8(the version vkd3d-proton pins in GE-Proton11-14) converts both, and the SPIR-V validates. It does not apply root bindings, so the remap half of the check is the register comparison above.081be2a8changes one more name. Thet5(space 0)StructuredBufferhad the aliassbuf65541because the root SRV had taken name 5; it now keepssbuf5. No other register changes.In game this needs #260. Neither program carries an RTS0, and the provider's reflection gives
Unsupportedfor this root, so both take the last arm ofcreate_pipeline_x_inner. Onmainthat arm uses the root-less translation first and never requests the root-keyed one this PR fixes. #260 makes that arm request it.0b86078does not include #260, so a game run of it would still use the root-less translations for these two.Not run: GPU, a game run,
root-srv-remapon AMD, vkd3d with real bindings.Host: RX 9060 XT, Mesa 26.2.6 RADV, GE-Proton11-14. This only sets the dxil-spirv version; nothing ran on the GPU. Baseline
xshaderfromf0ffa49.The offline runs and this write-up were done with an AI coding agent (Claude Code) on this machine.
Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-26T20:08:39Z.
@Valdi320 Follow-up with the AMD run of the GPU controls at
b141cbd.Result: the full translator stage passes, 41/41, including
root-srv-remap(PASS: 8 cases, 3072 words, 0 mismatches) andraw-index, which this PR changes (same counts).Setup: RX 9060 XT (
1002:7590), Mesa 26.2.6 RADV, GE-Proton11-14, Windows DXC 2026-09-29. The adapter was selected by UUID; all 42 guest logs show the RX 9060 XT. The provider DLL was an earlier local build, not one from this branch. These control guests use Proton's D3D12 and only copy it.Not run: the rest of
check(guest checks, D3D12 regression controls, Lanes) on this head.Run with an AI coding agent (Claude Code) on this machine.