Repository navigation
D3D12.X: a console MS in the AS slot gets a mesh stand-in - #743
abilliontokens wants to merge 6 commits into
Conversation
A retail title's NGG transform programs (128 vertices / 128 primitives, 21 params + SV_ClipDistance0 = 352 B per vertex) all failed ms_6_6 with "vertex plus primitive output size is greater than 32768": the split budget divided 32768 by the stride, but DXC accounts whole chunks of 32 vertices even when fewer are declared - verts[78] at 352 B is accounted as 96 (33792 B) and refused. Measured with dxc 1.8.2502 on this machine: every boundary from 9 to 26 float4 rows agrees with the chunk model. passthrough_split now floors the vertex budget to a multiple of 32 (capped at 256); the wide records go out in 7 groups of 19 triangles instead of 5 groups of 26 that DXC refuses. Test: the wide record splits and compiles, a 96-vertex group at 320 B compiles, a narrow record stays whole; fails without the change (5 != 7). Assisted-by: DSH (GPT-6.2 Astra)
The emitter picked the whole-record layout from passthrough_split == 1, but that count is the dispatch's: a record of 80 vertices with 22 float4 rows does not fit the mesh output budget as a whole (DXC accounts 96 vertices, 33792 B > 32768) while its single triangle's compact copies fit one group, so the count is 1 and verts[80] was declared and refused. The declaration now follows the vertex budget independently of the group count; the compact form covers every record over the budget, including the one-group ones. mesh_layout_independent_of_group_count covers the asymmetric limits (80 vertices, 1 triangle, 22 rows): compact declaration, count 1, DXC accepts. Found in review by shdann (PR xcl-dev#304). Assisted-by: DSH (GPT-6.2 Astra)
Review nits (Parakeet-Wheat): mesh_layout_independent_of_group_count ended with a block that rebuilt the same MsInterface and asserted verts[3] again; it now compiles the whole-record declaration (verts[80], accounted as 96: 33792 B) and asserts DXC refuses it. passthrough_split's doc claimed a comparison of the two forms it does not make; the doc now states what it does. Tests only plus a doc line; no behaviour change. Assisted-by: DSH (GPT-6.2 Astra)
… it is A retail title's minimap pipelines carry their console MS container in the AS subobject with no MS subobject. They were refused: translated, the title had rendered nothing from then on. That black screen was the translated mesh shaders failing their ms_6_6 output budget, fixed by the DXC vertex-chunk budget (xcl-dev#304); the slot itself was never the problem. With the budget in place the same shaders translate and the title keeps rendering. mesh_shader_slots moves the container to the MS slot (and it is not an AS any more); a real AS, an MS already present, or a PC shader are left as they are. Unit test covers all five cases. Assisted-by: DSH (GPT-6.2 Astra)
…e call The title creates tens of thousands of console-MS-in-AS-slot pipelines during boot and uses few. Translating each in the cached-only attempt ran on the title's thread: on RTX 3060 Ti the intro's first bright frame came ~5 s later than main (frame 1100 vs 980 at XCL_FRAME_DUMP=120), and on RX 9070 XT (wave64, the split path) Chrysana's 60 s captures stayed black throughout with 57163 pipelines queued. The attempt now defers a moved MS like a console compute pipeline (dxc::defer under pso_async::lazy): go_background hands the title a stand-in and the worker or the first bind translates. The detection log moved to a sparse counter at the build (first 5 + every 1000th); it used to fire twice per deferred pipeline (2930 lines in 120 s). Assisted-by: DSH (GPT-6.2 Astra)
…d in the call With ivall#541, a stream with a console MS in the AS slot and no MS subobject is translated as a mesh pipeline. Its stand-in (fallback_stream) still decided "mesh" from an MS subobject only, so it nulled the AS and kept a plain PS: no VS and no MS, which the driver refuses (E_INVALIDARG). go_background then fell back to building each of those pipelines in the title's call. Measured on a retail title (RTX 5060 Ti, cold DXIL cache, 240 s, same input): five title threads sat in dev_create_pipeline_state -> translated_mesh_stream -> dxc::compile at every thread dump, and 2947 programs were compiled. With the stand-in turned into an MS subobject with the stand-in MS, no title thread is in DXC at any dump, 804 programs are compiled (the rest wait for their first bind, as other pipelines do) and translation errors stay at 0. Assisted-by: Claude Code (Claude Opus 5.5)
|
Radeon RX 7900 XT / Windows 11 build 26100 / SDK DXC 1.9.2602.17. I tested #541 + #743 (
Both runs showed the account picker and loading artwork. Both eventually crashed during world loading at different title instructions. These totals cover different run lengths. This confirms the reported AS-slot refusal disappeared on this adapter. Playable world rendering remains unverified, and this comparison includes the linked depth-format change. The integration workspace reported 737 passed, 0 failed, 41 ignored. Both the shader slot and PC target-format regressions passed. One counted pass skipped at runtime because xgameruntime.dll was unavailable for the debug-layer draw test. Codex (GPT-6) ran the tests and drafted this report. |
Test report: #743 under Wine (Linux, NVIDIA): GTA VI's refused mesh pipelines are gone on vkd3d-protonMesh shaders under Wine go DXC → DXIL → vkd3d-proton's dxil-spirv → Setup
Unit tests (lib test binary under Wine, filter GTA VI 1.0.2.1 (my own dump; 60 s runs with
(The first pair. Not tested
AI use: Claude Code (Claude Opus 5.5) built both commits, ran everything above on the machine above and wrote this report. The blocks, counts and log lines are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one. |
|
Code audit + NVIDIA RTX 5080 test run on ReviewLooks clean — rewriting subobject tag Tested
Not tested
AI use: code review and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above. |
Stacked on #541 (head
24635db); only the top commit (8273a36) belongs here.With #541, a pipeline stream with a console MS in the AS slot and no MS subobject is translated as a mesh pipeline. Its stand-in did not follow:
fallback_streamstill decided "mesh" from an MS subobject only. So it nulled the AS and kept a plain PS, a stream with no VS and no MS that the driver refuses withE_INVALIDARG(no stand-in pipeline (0x80070057), logged only 3 times).go_backgroundthen fell back to building each of those pipelines in the title's call. That serialised the title's pipeline-creating threads on DXC.What is in it
crates/xcl/src/hle/d3d12x/real.rs:console_msholds the checkmesh_shader_slotsalready made.fallback_streamuses it: a console MS alone in the AS slot becomes an MS subobject with the stand-in MS (and the stand-in mesh PS).the_stand_in_of_a_console_ms_in_the_as_slot_has_a_mesh_shader. It fails without the change (left: [(24, 0), (2, …)]: a null AS and the plain PS) and passes with it.Tested
cargo test --workspace -- --test-threads=4on8273a36: 689 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).XCL_NETWORK=0, the same scripted input (XCL_PRESS_AT),XCL_THREAD_DUMP_AT=20,40,70,110,160:ce41f94a68ad44, same diff asfcfe511before the rebase)dxc::compile(dev_create_pipeline_state→translated_mesh_stream) at the 5 dumpstranslation_errors/failed_pipelinesRegression run
Main
f4ce27c:This PR
8273a36:Not tested
0x80070057); the cause is not known yet, and this PR does not cover them.24635db(a moved MS deferred to the background path) in a run that reaches world loading: only the 90 s regression run was made on this head; the thread-dump table is from3d7604b.mainthese pipelines are refused before a stand-in is made, so the path is not reached.AI use
Claude Code (Claude Opus 5.5) traced the stall from thread dumps, wrote the change and the test, ran the tests and runs above on my machine, and drafted this description.