Shaders: verify restored compute lane masks on D3D12 (stacked on #298) #1257
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1257
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1257/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?
@Castyan on GitHub · 2026-11-24 16:50 UTC · original
Castyan:compute-mask-spill-regression→main· +362 −35 · 4 files · 2 commits · closed without mergingFollow-up to #298. This draft carries that translator commit, followed by one D3D12 regression and a local before/after comparison.
The test spills the complement of a comparison mask to a VGPR lane, restores it, and consumes it in a compute select. Main rejects it with an untracked-mask error. With #298, the hardware adapter and WARP both return 17 for equal inputs and 29 otherwise.
The same local archive was scanned with the Windows SDK DXIL validator on
ffe310eand54f97db. Across 26,084 native programs, the mask-as-data refusal fell from 272 to 12. DXIL validates for seven additional compute and 27 additional pixel programs. Mesh and vertex totals are steady. The per-program comparison found zero lost validations.Workspace tests passed (343 passed, 5 ignored), shader Clippy passed with warnings denied, and the asset-policy check passed. Gameplay dispatch counts and rendering impact remain unmeasured. Reproduction details and per-stage counts are in docs/compute-lane-mask-spill.md.
OpenAI Codex assisted with the regression, measurements and documentation.
The console compiler spills lane masks like other SGPRs: v_writelane_b32 to a constant lane, v_readlane_b32 of that lane later. The lane pass took the read-back value for an opaque mask, and the spill write read the mask as data, which fails for a mask holding lanes not running there ("a lane mask holding lanes elsewhere read as data"). structure: a v_readlane_b32 of a constant lane that reads back a v_writelane_b32 of a mask (through writes of other lanes and agreeing joins), where the mask's value dominates the read, is that mask: each lane's bit is the one it had when spilled. Wave64 masks need both dwords read back from the same mask. lower: such a read leaves its value to the mask's readers, and a spill write of a mask is left out where that VGPR lane is read only by such reads (no vector instruction or computed-lane read sees it). Neither counts as reading the console's lanes. Co-Authored-By: Claude Opus 5.5 <[email protected]>@Castyan on GitHub · 2026-11-24 16:59 UTC · original
Runtime follow-up on Windows, Series S, hardware D3D12. I ran this PR's
5981894on top of the previous local test stack (83033b7, including the Series S PresentX compositor and root-UAV support). The resulting local test build was27d50d0, with a fresh shader cache.I matched shader IDs locally against the previous run's 57 compute shaders that were refused with
a lane mask holding lanes elsewhere read as data. All 57 appeared in this run.The 53 next refusals were descriptor read only as data (35), unknown structured-buffer stride (10), descriptor address or format read as data (4), scalar memory read as data (3), and an untracked lane-mask join (1).
This compares translation outcomes for the same shader IDs. Dispatch recovery, frame-rate impact, and the visual result remain to be confirmed. The process was still running at the time of measurement. The full logs were exported locally.
OpenAI Codex assisted with the test and analysis.
@Castyan on GitHub · 2026-11-24 17:22 UTC · original · edited 2026-11-24 17:29 UTC
Status of the cinematic test
151 of 153 tracked compute shaders now translate. The 3D scene still does not appear, and both hardware retests ended in
DXGI_ERROR_DEVICE_HUNG.Of the original 38 that were not seen, 36 translated on the second retest. The other two are still unobserved. All 115 translations from the first retest were also present in the second.
DispatchMeshBoth runs used the same local Series S setup on hardware D3D12 with fresh shader caches. The first test build (
9d439d5) added #1130, #483, #493 and #322 to the local #1257 integration. The second (3e5eaae) also added #568, #119 and the typed-null write counter. The second build passed 60 GPU and 131 shader tests, with two benchmarks ignored.These measurements cover the same locally matched shader identifiers. A successful translation does not establish that its draw or dispatch ran successfully, and the DRED stop is not proof of the cause of the hang. Raw logs stay local. OpenAI Codex assisted with the integration, tests and analysis.
@Castyan on GitHub · 2026-11-24 18:06 UTC · original
Series S hardware retest
The producer trace linked the mesh/pixel pipeline from the earlier DRED reports to two compute outputs whose PSOs were refused on this 32-lane adapter. With #439 integrated locally, D3D12 created both targeted PSOs and 77 of the 103 previously refused compute PSOs. Translation still refuses 26 of that set, including 25 with groups over 64 threads. The run also created PSOs for 150 of the 153 shaders previously blocked on descriptor reads.
The mesh/pixel pipeline stayed enabled. At 7 min 06 s, the title hit an unhandled
0x80000003breakpoint. The log recorded zero device removals. Scene rendering and cutscene completion remain unverified. The local integration passed 64 GPU and 171 shader tests. Codex assisted with diagnostics and testing.@Castyan on GitHub · 2026-11-24 18:13 UTC · original
Proposed next test
I’ll start with the compute producer whose output overlapped a mesh/pixel input at frame 1250, about 12 seconds before the first PSO creation was logged. On the local #439 integration, I’ll log when that pipeline is queued, built and first used, then correlate the producer’s dispatch and GPU completion with the mesh binding and any title exception.
If the trace identifies a queue delay, I’ll test the urgent scheduling portion of #1013 in isolation. If it identifies a resource-state problem, I’ll test the relevant transition from #334 instead. The comparison will use the same Series S profile and cinematic sequence. I’ll report whether the target dispatch completes, whether its output is available at the mesh binding, and where the run ends. Raw logs stay local. Codex is assisting with the instrumentation and tests.
@Castyan on GitHub · 2026-11-24 19:18 UTC · original
The next logical step would be to isolate the compute shader whose execution time reaches 658.1 ms to determine whether it contributes to the GPU device removal.
@Castyan on GitHub · 2026-11-24 18:37 UTC · original · edited 2026-11-24 20:03 UTC
Targeted scheduling result
With fresh caches on the same Series S setup, an opt-in priority based on #1013 reduced the selected compute producer's queue wait.
Both runs reached the same title breakpoint (
0x80000003). A separate run with DRED markers disabled lost the device at 163 seconds after all 37 traced writer submissions had completed.Latest run with DRED and per-list timing
The targeted producer queued for 4 ms. All 28 traced writer submissions completed, with 986 overlapping reader bindings after a completed writer and zero early overlaps. D3D12 reported device removal about 105 seconds after the targeted pipeline was first queued, following a long wait at the menu. DRED returned an empty breadcrumb list for the 16-list batch. The D3D12 debug layer was unavailable on this machine.
Per-list timing sampled a different compute shader five times, up to 658.1 ms for a
64?32?1dispatch. A separate report on #439 identified the same shader with a different dispatch size. The timing makes that shader a candidate for a focused follow-up. The command responsible for our device removal, visible 3D and cinematic completion remain unverified.Single-shader exclusion and re-enable
The same Series S executable, fresh application caches, DRED, and per-list timing were used throughout.
0x80000003With the shader re-enabled, timing captured 13 samples at
64?32?1groups, with a maximum of 1,229.4 ms. DRED put a one-groupDispatchMeshfrom the previously implicated mesh/pixel pair at command 125 of 128. The comparison supports a contribution from the selected compute shader or the work that follows it. The mechanism, visible 3D and cinematic completion remain unverified.Compute exchange and mesh guard retests
All three Series S runs used DRED, per-list timing, and fresh application caches with the slow compute shader enabled. Time starts when the traced producer queued. The timing samples are from slow lists.
64?32?18e4cd17)DispatchMesh2f2c64d)ede9634)DispatchMeshThe mesh test used the reference compute lowering. Its 124 traced writer submissions all completed. DRED identified a one-group
DispatchMeshat command 123/126 in the same mesh/pixel pair. It supplied no GPU fault address, and the D3D12 debug layer was unavailable. The tests leave the device-removal cause and cinematic completion open.The compute variants passed DXIL validation and host PSO creation. The mesh guard also passed validation and PSO creation for the implicated pair, 171 shader tests, 65 GPU tests, and shader Clippy with warnings denied.
Codex assisted with the patch, tracing and tests.
@Marvisak on GitHub · 2026-11-25 00:35 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Draft stacked on #298 (in main) adding one test and a 47-line document under docs/ (rule 3). Main has its own test of the restored mask.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed