D3D12.X: declare triangle topology for translated mesh PSOs #1937

Manually merged
github merged 1 commit from gh-pr/1937/head into gh-pr/1937/base 2026-11-26 05:10:33 +00:00
Owner

@⁠ZekkJJ on GitHub · 2026-11-24 23:43 UTC · original
ZekkJJ:upstream/two-pass-triangle → main · +68 −13 · 1 files · 1 commits · merged 2026-11-25 00:20 UTC

Declare TRIANGLE on the passthrough mesh graphics pass for translated MS and GS pipelines. The NGG compute pass still executes first. This keeps the stream topology consistent with the mesh shader output and the driver's cached PSO validation. Part of #1269.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs builds the translated triangle stream and replays a synthetic driver blob against it.

Tested

  • NVIDIA GeForce RTX 4060 Laptop GPU (8 GiB), driver 616.56, AMD Ryzen 7 8845HS, 16 GiB RAM, Windows 11 25H2 (26200.9974), Rust 1.98.1 (MSVC x64), Windows SDK 10.0.26100.0 (DXC/DXIL 1.8.2502.11). Debug tests and release smoke builds.
  • cargo build --locked --release -p xcl --jobs 1 succeeded on clean 9492f43f6ec1d57657c5ce71df007b485f443c03 and baseline 689f2db477c3c062cf162649781640ef8a977c18.
  • .\scripts\test.ps1 (Cargo build jobs 1, test threads 4) on stack head 024b2e2dc51924965df478fdb4f63fbcae9dc0b2 reported 983 passed, 0 failed, 45 ignored across 21 targets. Explicit runtime SKIPPED markers (23) were 18 no native wave64, 3 refused wave32 per-lane operations, 1 Windows Developer Mode unavailable, 1 no heap windows. Optional sample-backed cases also returned early with their sample variables unset. GPU regressions for TRIANGLE replay and both-pass persistence ran without runtime skips.
  • The standalone GPU regression passed on the stack head without a runtime skip, checking explicit TRIANGLE and D3D12 cached replay.
  • scripts/smoke.ps1 -Game <retail-folder> -Seconds 60 -Title 'Retail workload A' -Xcl <matching-release-binary> on the same anonymized retail workload. NVIDIA selected with XCL_ADAPTER=nvidia.

Regression run

main

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: NVIDIA GeForce RTX 4060 Laptop GPU
title: Retail workload A
seconds: 60
exit: 0x0
frames shown: 679 (PresentX 679)
presents per 2 s (last 3): 27 34 38
device removals: 0
crashes: 0
peak commit: 15853 MB

PR

xcl-smoke v1
commit: 9492f43f6ec1d57657c5ce71df007b485f443c03
gpu: NVIDIA GeForce RTX 4060 Laptop GPU
title: Retail workload A
seconds: 60
exit: 0x0
frames shown: 753 (PresentX 754)
presents per 2 s (last 3): 50 37 45
device removals: 0
crashes: 0
peak commit: 15859 MB

Not tested

  • AMD and other driver versions. Retail smoke coverage is limited to startup and frame production. The synthetic GPU test exercises cached replay.

AI use

  • OpenAI Codex (GPT-6, deployment variant unavailable) prepared the split, wrote the standalone regression, and ran and reviewed validation. The original investigation was archived by Google Antigravity; its model is unrecorded.
**@⁠ZekkJJ** on GitHub · 2026-11-24 23:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/1937) `ZekkJJ:upstream/two-pass-triangle` → `main` · +68 −13 · 1 files · 1 commits · merged 2026-11-25 00:20 UTC Declare TRIANGLE on the passthrough mesh graphics pass for translated MS and GS pipelines. The NGG compute pass still executes first. This keeps the stream topology consistent with the mesh shader output and the driver's cached PSO validation. Part of #1269. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs` builds the translated triangle stream and replays a synthetic driver blob against it. **Tested** - NVIDIA GeForce RTX 4060 Laptop GPU (8 GiB), driver 616.56, AMD Ryzen 7 8845HS, 16 GiB RAM, Windows 11 25H2 (26200.9974), Rust 1.98.1 (MSVC x64), Windows SDK 10.0.26100.0 (DXC/DXIL 1.8.2502.11). Debug tests and release smoke builds. - `cargo build --locked --release -p xcl --jobs 1` succeeded on clean `9492f43f6ec1d57657c5ce71df007b485f443c03` and baseline `689f2db477c3c062cf162649781640ef8a977c18`. - `.\scripts\test.ps1` (Cargo build jobs 1, test threads 4) on stack head `024b2e2dc51924965df478fdb4f63fbcae9dc0b2` reported 983 passed, 0 failed, 45 ignored across 21 targets. Explicit runtime SKIPPED markers (23) were 18 no native wave64, 3 refused wave32 per-lane operations, 1 Windows Developer Mode unavailable, 1 no heap windows. Optional sample-backed cases also returned early with their sample variables unset. GPU regressions for TRIANGLE replay and both-pass persistence ran without runtime skips. - The standalone GPU regression passed on the stack head without a runtime skip, checking explicit TRIANGLE and D3D12 cached replay. - `scripts/smoke.ps1 -Game <retail-folder> -Seconds 60 -Title 'Retail workload A' -Xcl <matching-release-binary>` on the same anonymized retail workload. NVIDIA selected with `XCL_ADAPTER=nvidia`. **Regression run** main ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: NVIDIA GeForce RTX 4060 Laptop GPU title: Retail workload A seconds: 60 exit: 0x0 frames shown: 679 (PresentX 679) presents per 2 s (last 3): 27 34 38 device removals: 0 crashes: 0 peak commit: 15853 MB ``` PR ``` xcl-smoke v1 commit: 9492f43f6ec1d57657c5ce71df007b485f443c03 gpu: NVIDIA GeForce RTX 4060 Laptop GPU title: Retail workload A seconds: 60 exit: 0x0 frames shown: 753 (PresentX 754) presents per 2 s (last 3): 50 37 45 device removals: 0 crashes: 0 peak commit: 15859 MB ``` **Not tested** - AMD and other driver versions. Retail smoke coverage is limited to startup and frame production. The synthetic GPU test exercises cached replay. **AI use** - OpenAI Codex (GPT-6, deployment variant unavailable) prepared the split, wrote the standalone regression, and ran and reviewed validation. The original investigation was archived by Google Antigravity; its model is unrecorded.
Use the passthrough mesh shader output topology on both translated MS and GS streams. Exercise cached replay against a synthetic triangle PSO.

Assisted-by: OpenAI Codex (GPT-6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:10:29 +00:00
github manually merged commit 9492f43f6e into gh-pr/1937/base 2026-11-26 05:10:33 +00:00
Author
Owner

@⁠raylitebull on GitHub · 2026-11-24 23:53 UTC · original

@⁠ZekkJJ Thanks for splitting #1937 -> #1941 -> #1942 cleanly! On #1937, 9492f43 passes CI and looks well-scoped (D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE for translated mesh streams), and currently only has NVIDIA RTX 4060 Laptop test results.

If an AMD reviewer (RDNA2/3/4) can verify passthrough_mesh_stream_accepts_a_triangle_driver_blob + a 60 s scripts/smoke.ps1 pair on 9492f43 (and similarly across #1941 / #1942), that will clear cross-vendor verification cleanly.

**@⁠raylitebull** on GitHub · 2026-11-24 23:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1937#issuecomment-7147906672) @⁠ZekkJJ Thanks for splitting `#1937` -> `#1941` -> `#1942` cleanly! On `#1937`, `9492f43` passes CI and looks well-scoped (`D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE` for translated mesh streams), and currently only has NVIDIA RTX 4060 Laptop test results. If an AMD reviewer (RDNA2/3/4) can verify `passthrough_mesh_stream_accepts_a_triangle_driver_blob` + a 60 s `scripts/smoke.ps1` pair on `9492f43` (and similarly across `#1941` / `#1942`), that will clear cross-vendor verification cleanly.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-25 00:12 UTC · original

Adding an AMD GPU (RDNA2, native wave64) to the NVIDIA RTX 4060 Laptop report above, with an NVIDIA run alongside. passthrough_mesh_stream_accepts_a_triangle_driver_blob passes on both. No scripts/smoke.ps1 pair: I have no title to run it on. Tested exact head 9492f43 (on its base 689f2db).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 966 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: passthrough_mesh_stream_accepts_a_triangle_driver_blob.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 975 passed, 0 failed, 45 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 62265d3 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-25 00:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/1937#issuecomment-7148265064) Adding an AMD GPU (RDNA2, native wave64) to the NVIDIA RTX 4060 Laptop report above, with an NVIDIA run alongside. `passthrough_mesh_stream_accepts_a_triangle_driver_blob` passes on both. No `scripts/smoke.ps1` pair: I have no title to run it on. Tested exact head `9492f43` (on its base `689f2db`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests`: **966 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `passthrough_mesh_stream_accepts_a_triangle_driver_blob`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **975 passed, 0 failed, 45 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `62265d3` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 02:41 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 02:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1937#issuecomment-7151043182) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This discussion has been locked. Commenting is limited to contributors.
No description provided.