Skip to content

xshader: resolve inline compute root SRVs by the actual root parameter - #252

Draft
Valdi320 wants to merge 1 commit into
brcly:mainfrom
Valdi320:work/root-srv-register-resolution-20261126
Draft

Valdi320 wants to merge 1 commit into
brcly:mainfrom
Valdi320:work/root-srv-register-resolution-20261126

Conversation

@Valdi320

Copy link
Copy Markdown
Contributor

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):

  • New synthetic regression reproduces Raw(5,false) before the patch; after it emits t1, space3 and the eight expected individual loads.
  • Eight invalid metadata variants refuse translation (missing/ambiguous records, wrong class or visibility, etc.).
  • New root-srv-remap translator GPU control binds a real root SRV at t1 space3; existing raw-index control remains intact. Both executed with rebuilt provider on RTX 4080 / GE-Proton11-14: 16 total cases, 6144 words, zero mismatches (including untouched guards).
  • All six no-GPU groups passed. Lanes rebuild attempted but stopped at the unrelated copy_resource_guest.cpp compile with exit 137 while another application was active. Full GPU suite and AMD validation outstanding; not marked as passed.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant