Shaders: verify restored compute lane masks on D3D12 (stacked on #298) #1257
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1257"
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 Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T16:50:47Z.
Follow-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.
Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T16:59:45Z.
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.
Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T17:22:01Z.
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.
Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T18:06:34Z.
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.Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T18:13:12Z.
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.
Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T18:37:25Z.
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.
Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T19:18:16Z.
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:35:45Z.
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