Repository navigation
Recompiler: the mesh pass-through budget accounts DXC’s vertex chunks - #304
Conversation
|
Tested Tested
Not tested
AI use
|
|
Independent native Windows/NVIDIA validation of #304 at Tested
SKIPPED / Not tested AI use |
|
Data point from a retail run on our machine (RTX 3060 Ti 8 GB, Ryzen 7 9800X3D, driver 32.0.16.1742): main + this PR is not in the stack, but the same title run with #300 + #294 + #273 (+#208) + #283 (+#252) reached the character loading screen, and its report shows These are the intentional refusals in AI use: GPT-6.2 Astra (API model selector) wrote this comment from our run's report.json; the human contributor observed the run. |
|
Tested Tested
Not tested
AI use: Claude Code with Claude Opus 5.5 (ran the tests and wrote this report). |
|
Tested RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed, so the debug-layer tests run), rustc 1.100.0 MSVC, debug, Pass: 671 passed, 0 failed, 41 ignored. SKIPPED: only the 2 Run and written with Claude Code (Claude Opus 5.5). |
shdann
left a comment
There was a problem hiding this comment.
At emit.rs:4721, one group can mean two different things. For 22 float4 rows, 80 maximum vertices, and one triangle, the cap is 64 vertices and the compact triangle fits in one group. The function returns 1. At line 4657 the caller selects the original layout and declares verts[80]. DXC charges for 96 vertices, or 33,792 bytes. I compiled a synthetic ms_6_6 shader with Windows SDK 10.0.26100 DXC: the 80-vertex declaration failed the 32,768-byte check. Changing only the declaration to three vertices compiled. Please select the compact layout from the vertex budget independently of the dispatch group count. A test with these asymmetric limits would cover this case. Reviewed at 8c7413c with OpenAI Codex (GPT-6).
… 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) (cherry picked from commit ce41f94)
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)
|
Both points addressed: Layout vs dispatch count — fixed in the new head: the declaration now follows the vertex budget alone (compact whenever the record's whole vertices exceed the chunk-accounted cap), independently of Thank you for the synthetic-shader verification — that made the fix precise instead of a guess. AI use: GPT-6.2 Astra (API model selector) in DSH wrote the fix and the test; the human contributor reviewed them. |
8c7413c to
b884f3c
Compare
… 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 (ivall#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)
|
Tested the new head Tested
Notes
Not tested
AI use: Claude Code with Claude Opus 5.5 ran the builds, the precompile and the tests, and drafted this comment. I checked each point before posting. AI-assisted (Claude Code). |
|
Tested
Not tested
AI use
|
…dget Combines the 32-vertex chunk mesh output budget (upstream PR ivall#304) with console-numbered MS subobject handling (upstream PR ivall#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); GTA VI 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
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)
|
Thanks — both nits fixed in
Full suite on AI use: GPT-6.2 Astra (API model selector) in DSH made the changes and ran the tests; the human contributor reviewed the diff. |
… 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)
…dget Combines the 32-vertex chunk mesh output budget (upstream PR ivall#304) with console-numbered MS subobject handling (upstream PR ivall#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); a retail title 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
…dget Combines the 32-vertex chunk mesh output budget (upstream PR ivall#304) with console-numbered MS subobject handling (upstream PR ivall#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); a retail title 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
…dget Combines the 32-vertex chunk mesh output budget (upstream PR ivall#304) with console-numbered MS subobject handling (upstream PR ivall#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); a retail title 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
|
Test report for Tested
Base Head Both exit Not tested
AI use |
…dget Combines the 32-vertex chunk mesh output budget (upstream PR xcl-dev#304) with console-numbered MS subobject handling (upstream PR xcl-dev#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); a retail title 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
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 ivall#304). 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)
…dget Combines the 32-vertex chunk mesh output budget (upstream PR ivall#304) with console-numbered MS subobject handling (upstream PR ivall#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); a retail title 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
|
The rule holds over the whole range a pass-through can reach, not only rows 9–26. I bisected the largest vertex count The synthetic shaders were float4 elements only. Clip / cull distances declared narrower than a row were not measured; the formula counts them as full rows, which can only overestimate. Tested: RTX 4060 Laptop GPU (driver 32.0.16.1687), i7-13650HX, Windows 11 25H2 (26200), Rust 1.100.0 MSVC, debug. AI use: Claude Code (Claude Opus 5.5) wrote the DXC bisection script, ran it and the tests, and drafted this comment; I checked the numbers before posting. |
NathanTheophile bisected DXC's ms_6_6 acceptance boundary over 96 cases (1-32 float4 rows, up to 256 primitives): the formula matches exactly everywhere, not only rows 9-26. Doc-only; narrower clip/cull rows count as full rows (overestimate only). Assisted-by: DSH (GPT-6.2 Astra)
|
@NathanTheophile Thank you — a 96-case bisect that shows the formula is DXC's exact boundary (not just a safe bound) across the whole reachable range is exactly the evidence the doc line was missing. Taken: head is now
@iggyvilla Thanks for the RDNA2 wave64 report — and for pinning the 3 failures as pre-existing on that card ( AI use: GPT-6.2 Astra (API model selector) in DSH made the doc edit, ran the tests, and drafted this comment; the human contributor reviewed before posting. |
…dget Combines the 32-vertex chunk mesh output budget (upstream PR xcl-dev#304) with console-numbered MS subobject handling (upstream PR xcl-dev#630): - emit.rs: account for DXC's 32-vertex chunk sizing in passthrough_max_vertices and select single vs split pass-through layout by vertex budget. - real.rs: treat a console MS container at subobject 24 (with no PC MS at 25) as the stream's MS, rewrite subobject 24 to 25 in fallback_stream with the stand-in MS, and defer compilation via pso_async::lazy(). Verified on Linux (GE-Proton11-14, RX 9060 XT): 7/7 targeted tests pass (including gpu_mesh_mode_two_passes and console_ms_stream_tests); a retail title 75 s run shows 0 AS-slot refusals, translation_errors=[], 937/937 frames at 30.0 FPS.
A retail title's NGG transform programs (128 vertices / 128 primitives, 21 params +
SV_ClipDistance0= 352 B per vertex) all failms_6_6with "vertex plus primitive output size is greater than 32768" - 19 programs on our machine (MS_VS_TransformLit/TransformD/TransformSkin*, all the same shape). The pipelines then run without a translated mesh shader.Root cause:
passthrough_splitdivides the 32768 B budget by the vertex stride, but DXC accounts whole chunks of 32 vertices even when fewer are declared.verts[78]at 352 B is accounted as 96 vertices (33792 B) and refused; the split it computes (5 groups of 26 triangles) is refused for every one of these programs.Measured the accounting with dxc 1.8.2502 (Windows SDK 10.0.26100) on synthetic mesh shaders: bisected the max vertex count for 1..26 float4 rows - every boundary agrees with
floor(min(256, 32768/stride) / 32) * 32(e.g. 22 rows: 64 verts OK, 65 refused; 21 rows: 96 OK, 97 refused). Primitive indices do not move the boundary at these sizes.What is in it
passthrough_split: the vertex budget is floored to a multiple of 32 (capped at 256). The wide records now go out in 7 groups of 19 triangles, which DXC accepts.mesh_split_accounts_vertex_chunks: the wide record (the retail shape) splits into 7 groups and compiles; a 20-row record splits into 4 groups of 96 vertices and compiles; a narrow record stays whole. Fails without the change (5 != 7). No GPU needed, only DXC.Tested
cargo test --workspace -- --test-threads=4: 612 passed, 0 failed, 20 ignored (lib, includes the new test); other suites 13+3+1+3+2+7+1+1+2+1+6 passed, 0 failed, 4+12 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)xcl shaders <title> --precompile --only mson our copy of the title: 19 ms_6_6 errors before (3864 compiled / 14681 cached in that pass); after, the same pass compiles the 6 distinct failing sources with 0 errors (18558 cached)Not tested
gpu_mesh_mode_two_passeson this NVIDIA adapter)Review fix (shdann): the layout is now chosen by the vertex budget alone, independently of the dispatch group count — a record of 80 vertices / 1 triangle / 22 float4 rows declares compact
verts[3](count 1) instead ofverts[80](accounted as 96 = 33792 B, refused by DXC). New testmesh_layout_independent_of_group_countpins the asymmetric case;mesh_split_accounts_vertex_chunksunchanged. Rebased onto9ce2070.Tested (new head)
cargo build --workspace,cargo test --workspace --no-fail-fast -- --test-threads=1: 686 passed, 0 failed, 41 ignored (2 GPU SKIPPED lines: no wave64 on this adapter). RTX 3060 Ti 8 GB, Ryzen 7 9800X3D, driver 32.0.16.1742, Windows 11.Review nits (Parakeet-Wheat) addressed in
2a2cc6d(tests + one doc line, no behaviour change):mesh_layout_independent_of_group_countnow compiles the whole-record declaration (verts[80], accounted as 96) and asserts DXC refuses it, instead of rebuilding the same interface and assertingverts[3]again;passthrough_split's doc no longer claims a comparison of the two forms it does not make. Full suite on2a2cc6d: 686 passed, 0 failed, 41 ignored (--test-threads=1, 2 GPU SKIPPED no wave64). Independent confirmation on this head: Parakeet-Wheat's DXC 1.8.2502 precompile (19 errors on main -> 0 here) and CryingLaughing's RTX 4080 GPU fixture (compact layout draws all 1024 pixels identically; the parent'sverts[80]refused before dispatch).Regression run
Main
1c87b1d(current main):Head
1ab9ba9:AI use
GPT-6.2 Astra (API model selector), working as the coding agent in this session: bisected the DXC accounting on this machine, wrote the fix, the test and this description, ran the tests and the smoke runs. The human contributor reviewed the diff and the measurements.