shader: the #690 gate admits aliases, stores and bitcast-spelled calls #733
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#733
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?
@MoonYueya on GitHub · 2026-11-22 23:51 UTC · original
What shipped in #690
#690 refuses to submit a module while it still executes an
xbox.*builtin, and refuses to submit without the module's inventory at all. The scan behind it takes a call's callee as the first@symbol on an instruction line: the callee name followed by(, with the operand list after it.The gap
Six forms reach the same builtin without matching that shape, so the gate admits them. Each line below is source-built synthetic IR; none of them is a direct call to a symbol spelled
@xbox.X(.@alias_bfi = alias i32 (i32), ptr @xbox.BFIthencall i32 @alias_bfi(i32 1)(alias)store ptr @xbox.global_store_dword_with_cache, ptr %slot(store)%fp = bitcast ptr @xbox.foo to ptrthencall void %fp(i32 1)(bitcast)@table = global ptr @xbox.Med3_F32(global-initializer)call void @llvm.dbg.value(metadata ptr @xbox.foo, i64 0)(call-operand)call void bitcast (void (i32)* @xbox.foo to void (i64)*)(i64 5)(right after the nameForms 1–5 keep the builtin reachable through an alias, a pointer or an operand, and #690 only counted callee positions. Form 6 is a genuine direct call that the callee pattern misses because the symbol is followed by
toinstead of(.Expected behaviour
xbox.*symbol, and the refusal names the form, so a report says how the module still reaches the builtin (calls ∪ references).--only-without-xbox-callskeeps one meaning: no form reaches anxbox.*symbol.Acceptance
ctest --preset dev --no-tests=error -R 'dxil_retarget|shader_metadata|dxcontainer_part_offsets' -Vgreen with no skip, and the new cases visible indxil_retarget_controls.python -B tests/docs_links_check.py,python -B tests/bidi_controls_check.pyandpython -B tests/hardware_reports_check.pygreen.docs/experiments.mddescribes the wider rule, including what each group means and what the archive filter selects.Drafted with AI assistance; the forms above were checked against the merged scan in #690.
Refs #690
Refs #584
@MoonYueya on GitHub · 2026-11-22 23:52 UTC · original
Refs #584 (the S2 tracking issue).
Fix proposed in #734.
@R0Y00 on GitHub · 2026-11-22 23:55 UTC · original
Thanks for the report. The final-module gate should fail closed whenever the inventory cannot account for executable references to an Xbox intrinsic. Please keep calls and other executable references separate in the diagnostic, and keep declarations and metadata-only references allowed when they have no executable use. Use synthetic IR and a recording submission stub to verify zero backend invocations on refusal and one invocation for allowed modules. An advisory lowering status must never clear a reference still present in the final module.
@R0Y00 on GitHub · 2026-11-23 03:11 UTC · original
#734 merged as
81cf1e3. Its source-built controls confirm that executable calls and references stop submission, declarations and debug-only metadata remain separate, and a reported lowering cannot override a reference still present in the final module. The reported Windows run passed 7/7 with no skips, and the exact head passed both Windows and both Linux CI jobs. This completes the scoped gate update. The broader retargeting work remains in #584.