D3D12.X: strip console-only root-signature flags in D3D12SerializeRootSignature #2437

Merged
Decodere merged 1 commit from upstream-pr/2447 into main 2026-11-29 13:58:13 +00:00
Decodere commented 2026-11-25 19:18:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T19:18:29Z.


What is in it
Strip Xbox console-only root-signature flags in D3D12SerializeRootSignature and share sanitization/error-blob handling with D3D12SerializeVersionedRootSignature in crates/xcl/src/hle/d3d12x/mod.rs (+105/-34 lines, single file):

  • D3D12SerializeVersionedRootSignature already stripped console-only bits above PC_FLAGS = 0xFFF (such as 0x3000000) and logged/cleaned up error blobs, whereas 1.0 D3D12SerializeRootSignature forwarded raw D3D12_ROOT_SIGNATURE_DESC directly to Windows d3d12.dll, which rejects unknown flag bits with E_INVALIDARG (0x80070057).
  • Extract a shared serialize_root_sig<const QWORDS: usize> helper with PC_FLAGS = 0xFFF: copies the descriptor into an 8-byte-aligned stack buffer (40 bytes / flags at +32 for D3D12SerializeRootSignature; 48 bytes / flags at +40 for D3D12SerializeVersionedRootSignature) only when !PC_FLAGS bits are set, drops unknown bits without mutating the caller's struct, zeroes caller-provided *err before forwarding, logs error-blob diagnostics on failure even when err is NULL, and releases temporary error blobs cleanly.
  • Add a WARP/CPU unit test (hle::d3d12x::tests::serialize_root_signature_strips_console_flags_and_preserves_pc_flags) verifying descriptor layout offsets, console-flag stripping and PC-flag preservation via D3D12CreateRootSignatureDeserializer for both 1.0 and versioned serializers, caller-struct immutability, Windows 10 in-box / Agility d3d12.dll failure handling without assuming non-empty runtime error text on unknown versions (guarding blob_release when err_out is null), and runtime-independent error-blob forwarding and own_err cleanup via a mock ID3DBlob vtable.

Part of #1452
Part of #1333

Tested

  • Failing-first on unmodified origin/main (569f0fc5): XCL_ADAPTER=warp cargo test -p xcl --lib hle::d3d12x::tests -- --test-threads=1 --nocapture failed 1 of 1 (D3D12SerializeRootSignature rejected console flags: 0x80070057).
  • Post-fix hle::d3d12x::tests (bd586636, rebased onto origin/main e1d84b7d):
    • Release WARP (XCL_ADAPTER=warp cargo test --release -p xcl --lib hle::d3d12x::tests -- --test-threads=1 --nocapture): 1 passed; 0 failed; 0 ignored (0.14 s).
    • Release default RTX 4060 (cargo test --release -p xcl --lib hle::d3d12x::tests -- --test-threads=1 --nocapture): 1 passed; 0 failed; 0 ignored (0.37 s).
  • Full release workspace (cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture, RTX 4060): 37 test binaries, 1424 passed; 0 failed; 46 ignored.
    • 29 pre-existing SKIPPED lines on this RTX 4060 host (21 no wave64, 3 per-lane wave32 refused, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no heap windows, 1 cannot disable driver cache; 0 skipped in hle::d3d12x::tests).

Regression run
Paired 60 s RTX 4060 smoke (scripts/smoke.ps1 -Seconds 60) on base origin/main vs PR head (1566 vs 1550 frames = 101.0%, 60 60 60 steady pace, 0 device removals, 0 crashes):

Base (origin/main):

xcl-smoke v1
commit: 889ef3e8aa7f267323ab4879e735e65da6bcef10
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1550 (PresentX 1550)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13981 MB

PR head:

xcl-smoke v1
commit: bd58663616a18dd2dca7fb1850f0ab41d528a180
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14000 MB

Not tested

  • A live retail title calling 1.0 D3D12SerializeRootSignature with console-only flag bits (console-only flag stripping, PC-flag preservation via D3D12CreateRootSignatureDeserializer, and error-blob cleanup are covered by the unit test against real Windows d3d12.dll and mock ID3DBlob).
  • In-box Windows 10 d3d12.dll without Agility SDK (this host runs Windows 11 26200; the updated test removes the assumption that unknown-version failures emit non-empty "version" text and guards blob_release on null).
  • D3D12 debug layer (d3d12SDKLayers.dll not installed on this host).

AI use
Written and verified with Google Antigravity (Gemini 4 Neon). All changes were validated locally with failing-first WARP tests, full release workspace tests, and paired 60 s RTX 4060 smoke runs.

<!-- greyfinch-sync:ivall/xcl:issue:5497626259 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T19:18:29Z. --- **What is in it** Strip Xbox console-only root-signature flags in `D3D12SerializeRootSignature` and share sanitization/error-blob handling with `D3D12SerializeVersionedRootSignature` in `crates/xcl/src/hle/d3d12x/mod.rs` (`+105/-34` lines, single file): - `D3D12SerializeVersionedRootSignature` already stripped console-only bits above `PC_FLAGS = 0xFFF` (such as `0x3000000`) and logged/cleaned up error blobs, whereas 1.0 `D3D12SerializeRootSignature` forwarded raw `D3D12_ROOT_SIGNATURE_DESC` directly to Windows `d3d12.dll`, which rejects unknown flag bits with `E_INVALIDARG` (`0x80070057`). - Extract a shared `serialize_root_sig<const QWORDS: usize>` helper with `PC_FLAGS = 0xFFF`: copies the descriptor into an 8-byte-aligned stack buffer (`40` bytes / flags at `+32` for `D3D12SerializeRootSignature`; `48` bytes / flags at `+40` for `D3D12SerializeVersionedRootSignature`) only when `!PC_FLAGS` bits are set, drops unknown bits without mutating the caller's struct, zeroes caller-provided `*err` before forwarding, logs error-blob diagnostics on failure even when `err` is `NULL`, and releases temporary error blobs cleanly. - Add a WARP/CPU unit test (`hle::d3d12x::tests::serialize_root_signature_strips_console_flags_and_preserves_pc_flags`) verifying descriptor layout offsets, console-flag stripping and PC-flag preservation via `D3D12CreateRootSignatureDeserializer` for both 1.0 and versioned serializers, caller-struct immutability, Windows 10 in-box / Agility `d3d12.dll` failure handling without assuming non-empty runtime error text on unknown versions (guarding `blob_release` when `err_out` is null), and runtime-independent error-blob forwarding and `own_err` cleanup via a mock `ID3DBlob` vtable. Part of #1452 Part of #1333 **Tested** - Failing-first on unmodified `origin/main` (`569f0fc5`): `XCL_ADAPTER=warp cargo test -p xcl --lib hle::d3d12x::tests -- --test-threads=1 --nocapture` failed `1` of `1` (`D3D12SerializeRootSignature rejected console flags: 0x80070057`). - Post-fix `hle::d3d12x::tests` (`bd586636`, rebased onto `origin/main` `e1d84b7d`): - Release WARP (`XCL_ADAPTER=warp cargo test --release -p xcl --lib hle::d3d12x::tests -- --test-threads=1 --nocapture`): `1 passed; 0 failed; 0 ignored` (`0.14 s`). - Release default RTX 4060 (`cargo test --release -p xcl --lib hle::d3d12x::tests -- --test-threads=1 --nocapture`): `1 passed; 0 failed; 0 ignored` (`0.37 s`). - Full release workspace (`cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture`, RTX 4060): `37` test binaries, `1424 passed; 0 failed; 46 ignored`. - `29` pre-existing `SKIPPED` lines on this RTX 4060 host (`21` no wave64, `3` per-lane wave32 refused, `3` no D3D12 debug layer / `d3d12SDKLayers.dll`, `1` no heap windows, `1` cannot disable driver cache; `0` skipped in `hle::d3d12x::tests`). **Regression run** Paired 60 s RTX 4060 smoke (`scripts/smoke.ps1 -Seconds 60`) on base `origin/main` vs PR head (`1566` vs `1550` frames = `101.0%`, `60 60 60` steady pace, `0` device removals, `0` crashes): Base (`origin/main`): ``` xcl-smoke v1 commit: 889ef3e8aa7f267323ab4879e735e65da6bcef10 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1550 (PresentX 1550) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13981 MB ``` PR head: ``` xcl-smoke v1 commit: bd58663616a18dd2dca7fb1850f0ab41d528a180 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1566 (PresentX 1566) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14000 MB ``` **Not tested** - A live retail title calling 1.0 `D3D12SerializeRootSignature` with console-only flag bits (console-only flag stripping, PC-flag preservation via `D3D12CreateRootSignatureDeserializer`, and error-blob cleanup are covered by the unit test against real Windows `d3d12.dll` and mock `ID3DBlob`). - In-box Windows 10 `d3d12.dll` without Agility SDK (this host runs Windows 11 26200; the updated test removes the assumption that unknown-version failures emit non-empty `"version"` text and guards `blob_release` on null). - D3D12 debug layer (`d3d12SDKLayers.dll` not installed on this host). **AI use** Written and verified with Google Antigravity (Gemini 4 Neon). All changes were validated locally with failing-first WARP tests, full release workspace tests, and paired 60 s RTX 4060 smoke runs.
SlopTart commented 2026-11-25 20:08:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T20:02:44Z.


gpu_ suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and gpu_promoted_uav_clear_values_pass_create_committed_resource (report); none caused by this PR.
(empty_stream_descriptors_do_not_change_the_key was not picked up by substring filter in the --lib target; suite covers the gpu-side changes.)

<!-- greyfinch-sync:ivall/xcl:comment:7173110412 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7173110412). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T20:02:44Z. --- `gpu_` suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and `gpu_promoted_uav_clear_values_pass_create_committed_resource` ([report](https://github.com/xcl-dev/xcl/pull/2280#issuecomment-7172066690)); none caused by this PR. (`empty_stream_descriptors_do_not_change_the_key` was not picked up by substring filter in the `--lib` target; suite covers the gpu-side changes.)
bmjask commented 2026-11-25 20:37:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:37:59Z.

Review: COMMENTED


No code-level blocker found. The shared helper preserves the caller descriptor, strips only console-only bits for both layouts, and current Windows CI is green. Nonblocking test gap: shared error-blob handling is covered only through the 1.0 serializer. A failing versioned-serializer case with NULL/non-NULL error output would validate ownership/reset in that path.

<!-- greyfinch-sync:ivall/xcl:review:6064639873 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#pullrequestreview-6064639873). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T20:37:59Z. **Review:** COMMENTED --- No code-level blocker found. The shared helper preserves the caller descriptor, strips only console-only bits for both layouts, and current Windows CI is green. Nonblocking test gap: shared error-blob handling is covered only through the 1.0 serializer. A failing versioned-serializer case with NULL/non-NULL error output would validate ownership/reset in that path.
DavidM1911 commented 2026-11-25 21:05:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:21:56Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7173561229 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7173561229). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:21:56Z. --- 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!
xpatfussy69x commented 2026-11-25 23:09:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by xpatfussy69x on 2026-11-25T22:21:48Z.


Test run on exact head 75c835d (75c835d425f8a614d346aceaf3402d23c0f1785d, on its base 2898511), clean tree.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0; debug build for the tests, release for the smoke runs
  • cargo test --workspace -- --test-threads=4: 1364 passed, 0 failed, 46 ignored
  • SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 (on main too)
  • cargo test -p xcl --lib serialize_root_signature: 1 passed, 0 failed
  • This PR's new tests in the workspace run:
    • serialize_root_signature_strips_console_flags_and_preserves_pc_flags: ok

Regression run (60 s, default settings, a retail title)

main:

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 3060
title: c3f791f3
seconds: 60
exit: 0x0
frames shown: 1091 (PresentX 1091)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

this PR:

xcl-smoke v1
commit: 75c835d425f8a614d346aceaf3402d23c0f1785d
gpu: NVIDIA GeForce RTX 3060
title: c3f791f3
seconds: 60
exit: 0x0
frames shown: 1137 (PresentX 1137)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14796 MB

No crash or device removal; frames 104 % of main's, peak commit 100 %.

Not tested

  • Whether the title serializes a root signature with console-only flags in this run: a regression check only
  • The PR merged into current main (tested on its own base; it merges into e1d84b7 without conflicts)
  • AMD / native wave64

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and both smoke runs on the machine above and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7176268276 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7176268276). Originally posted by [xpatfussy69x](https://github.com/xpatfussy69x) on 2026-11-25T22:21:48Z. --- Test run on exact head `75c835d` (`75c835d425f8a614d346aceaf3402d23c0f1785d`, on its base `2898511`), clean tree. **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0; debug build for the tests, release for the smoke runs - `cargo test --workspace -- --test-threads=4`: 1364 passed, 0 failed, 46 ignored - SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused `V_MUL_F16` / `V_PK_MUL_F16` / `V_CVT_F16_F32` (on `main` too) - `cargo test -p xcl --lib serialize_root_signature`: 1 passed, 0 failed - This PR's new tests in the workspace run: - `serialize_root_signature_strips_console_flags_and_preserves_pc_flags`: ok **Regression run** (60 s, default settings, a retail title) main: ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1091 (PresentX 1091) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` this PR: ``` xcl-smoke v1 commit: 75c835d425f8a614d346aceaf3402d23c0f1785d gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1137 (PresentX 1137) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14796 MB ``` No crash or device removal; frames 104 % of `main`'s, peak commit 100 %. **Not tested** - Whether the title serializes a root signature with console-only flags in this run: a regression check only - The PR merged into current `main` (tested on its own base; it merges into `e1d84b7` without conflicts) - AMD / native wave64 **AI use** - Claude Code (Claude Opus 5.5) ran the tests and both smoke runs on the machine above and wrote this report.
HAL9000RELOADED commented 2026-11-25 23:09:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by HAL9000RELOADED on 2026-11-25T22:53:10Z.


Windows 10 data point for 75c835d: RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2 (19045.6456), Rust 1.98.1 MSVC.

serialize_root_signature_strips_console_flags_and_preserves_pc_flags:

  • With the Agility SDK 1.620.2 (XCL_D3D12_DIR), on the card and with XCL_ADAPTER=warp: passes. Merged on 6d12f58 it also passes with the whole crate.
  • On the in-box Windows 10 runtime (no XCL_D3D12_DIR), card and WARP, merged on 889ef3e: fails with "caller error blob missing diagnostic". The flag checks before that pass; only the version-99 case differs. The in-box D3D12SerializeRootSignature fails as expected but its error blob has no text (I printed it: ""), so contains("version") is false.

So the stripping works on Windows 10 too. The last assertion depends on the runtime's error text, which the in-box runtime doesn't give. Checking only the failure code there would let the test pass on Windows 10 without Agility.

<!-- greyfinch-sync:ivall/xcl:comment:7176899543 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7176899543). Originally posted by [HAL9000RELOADED](https://github.com/HAL9000RELOADED) on 2026-11-25T22:53:10Z. --- Windows 10 data point for `75c835d`: RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2 (19045.6456), Rust 1.98.1 MSVC. `serialize_root_signature_strips_console_flags_and_preserves_pc_flags`: - With the Agility SDK 1.620.2 (`XCL_D3D12_DIR`), on the card and with `XCL_ADAPTER=warp`: passes. Merged on `6d12f58` it also passes with the whole crate. - On the in-box Windows 10 runtime (no `XCL_D3D12_DIR`), card and WARP, merged on `889ef3e`: fails with "caller error blob missing diagnostic". The flag checks before that pass; only the version-99 case differs. The in-box `D3D12SerializeRootSignature` fails as expected but its error blob has no text (I printed it: `""`), so `contains("version")` is false. So the stripping works on Windows 10 too. The last assertion depends on the runtime's error text, which the in-box runtime doesn't give. Checking only the failure code there would let the test pass on Windows 10 without Agility.
Decodere commented 2026-11-25 23:09:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T23:05:18Z.


@HAL9000RELOADED Thanks for the Windows 10 in-box d3d12.dll test point!

Updated in bd586636 (and rebased onto e1d84b7d): the version = 99 check now verifies the failure HRESULT and *err initialization without assuming non-empty "version" text on in-box Windows 10 runtimes (and guards blob_release when err_out is null), while a runtime-independent mock ID3DBlob check on serialize_root_sig deterministically covers caller error-blob forwarding and internal own_err cleanup. Re-verified hle::d3d12x::tests (1/0 on both WARP and RTX 4060), full release workspace (1424 passed, 0 failed), and paired 60 s smoke (1550 -> 1566, 0 crashes/removals).

<!-- greyfinch-sync:ivall/xcl:comment:7177131814 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7177131814). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T23:05:18Z. --- `@HAL9000RELOADED` Thanks for the Windows 10 in-box `d3d12.dll` test point! Updated in `bd586636` (and rebased onto `e1d84b7d`): the `version = 99` check now verifies the failure HRESULT and `*err` initialization without assuming non-empty `"version"` text on in-box Windows 10 runtimes (and guards `blob_release` when `err_out` is null), while a runtime-independent mock `ID3DBlob` check on `serialize_root_sig` deterministically covers caller error-blob forwarding and internal `own_err` cleanup. Re-verified `hle::d3d12x::tests` (`1/0` on both WARP and RTX 4060), full release workspace (`1424 passed, 0 failed`), and paired 60 s smoke (`1550 -> 1566`, `0` crashes/removals).
DavidM1911 commented 2026-11-26 02:08:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:50:05Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7180183699 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7180183699). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T01:50:05Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
HAL9000RELOADED commented 2026-11-26 10:06:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by HAL9000RELOADED on 2026-11-26T09:29:33Z.


Re-run at bd58663 on the same Windows 10 22H2 (19045) machine, RX 7900 XTX (RDNA3), driver 32.0.32015.7029.

  • In-box runtime (no XCL_D3D12_DIR): serialize_root_signature_strips_console_flags_and_preserves_pc_flags passes, 3/3 runs.
  • With Agility 1.620.2 (XCL_D3D12_DIR): passes too.

At 75c835d the same test failed here on the in-box runtime, so the change covers it.

AI-assisted (Claude Code): tests run on my machine, text drafted with Claude.

<!-- greyfinch-sync:ivall/xcl:comment:7188062928 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7188062928). Originally posted by [HAL9000RELOADED](https://github.com/HAL9000RELOADED) on 2026-11-26T09:29:33Z. --- Re-run at `bd58663` on the same Windows 10 22H2 (19045) machine, RX 7900 XTX (RDNA3), driver 32.0.32015.7029. - In-box runtime (no `XCL_D3D12_DIR`): `serialize_root_signature_strips_console_flags_and_preserves_pc_flags` passes, 3/3 runs. - With Agility 1.620.2 (`XCL_D3D12_DIR`): passes too. At `75c835d` the same test failed here on the in-box runtime, so the change covers it. _AI-assisted (Claude Code): tests run on my machine, text drafted with Claude._
Kalmarv commented 2026-11-29 03:38:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T03:38:41Z.


merge-check
base: fa204595a4
head: bd58663616
merge: clean (trial merge 8cae7feacb6be1bfd421a719e8d58eee091f2190, local, not pushed; mod.rs auto-merged; git diff --check clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2605 passed, 4 failed, 49 ignored; SKIPPED: 26, the usual set (21 no wave64 on this 32-lane GPU, 3 per-lane f16/f32 forms refused (#1426 semantics), 2 no heap windows). The new hle::d3d12x::tests::serialize_root_signature_strips_console_flags_and_preserves_pc_flags ran and passed. The 4 failures are one flake in code this PR doesn't touch: shaders::pipeline_library::tests::builder_deduplicates_names_and_atomically_replaces_output counted 4 library entries instead of 2 (finish counts a process-global builder that other tests can add pipelines to while it runs in parallel). Its panic poisoned the shared BUILD_TEST lock, which then failed graphics_pipeline_round_trips_through_serialized_library, mesh_pipeline_round_trips_through_serialized_library and warm_library::cold_publish_makes_an_unchanged_corpus_reusable with PoisonError. All 10 pipeline_library / warm_library tests passed when rerun alone on the same merge.
review: none blocking; whole diff read. D3D12SerializeRootSignature now strips console-only flag bits (anything outside 0xFFF; seen: 0x3000000 from XboxBvhBuilder.dll) the same way D3D12SerializeVersionedRootSignature already did. Both go through one serialize_root_sig, which copies the 40-byte 1.0 desc (flags at +32) or the 48-byte versioned desc (flags at +40) before changing it, so the caller's desc is untouched. The test checks those sizes and offsets with size_of / offset_of!, and the reads are unaligned-safe. Dispatch is the same as the old forward! macro: the system export on the Real backend, otherwise null::. The failure log now names the entry point and reads parameters / samplers / flags at the right offsets for each version. One behaviour change: a non-null err is set to null on entry, so a caller's error pointer is always initialized; that matches the runtime's contract and the test covers it. The error blob is released only when the caller passed no err.
performance: none to speak of (one 40/48-byte copy, only when console bits are set). Title run (release build of the merge, scratch/fast-world.py fast profile, about 85 s in world): exit 0, 0 crashes, 0 device removals, world entry 80.0 s, peak commit 31,227 MB, 68 WARN lines, failed_pipelines 0, no translation errors, no new WARN kinds against a main fa204595 run on the same harness (world entry 76.8 s, peak commit 33,027 MB, 86 WARN lines). This title only calls the versioned entry point: 17 "D3D12SerializeVersionedRootSignature: console flags 0x3000000 dropped" lines on both main and the merge, and no D3D12SerializeRootSignature call. So at run time the refactored versioned path behaves as before, and the new 1.0 stripping is covered only by the unit test. Both runs show 0 fps in the world because the cache doesn't match the translator identity.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74, wave32 only), AMD Ryzen 9 9950X, Windows 11 build 26200; rustc 1.99.0, debug test profile, release build for the title run, DXC 1.9.2609 via XCL_DXC_DIR. Claude Code, Claude Opus 5.5: merge, build, suite, title run and full-diff review; this report.

<!-- greyfinch-sync:ivall/xcl:comment:7250173222 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7250173222). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T03:38:41Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: bd58663616a18dd2dca7fb1850f0ab41d528a180 merge: clean (trial merge 8cae7feacb6be1bfd421a719e8d58eee091f2190, local, not pushed; mod.rs auto-merged; `git diff --check` clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2605 passed, 4 failed, 49 ignored; SKIPPED: 26, the usual set (21 no wave64 on this 32-lane GPU, 3 per-lane f16/f32 forms refused (#1426 semantics), 2 no heap windows). The new `hle::d3d12x::tests::serialize_root_signature_strips_console_flags_and_preserves_pc_flags` ran and passed. The 4 failures are one flake in code this PR doesn't touch: `shaders::pipeline_library::tests::builder_deduplicates_names_and_atomically_replaces_output` counted 4 library entries instead of 2 (`finish` counts a process-global builder that other tests can add pipelines to while it runs in parallel). Its panic poisoned the shared `BUILD_TEST` lock, which then failed `graphics_pipeline_round_trips_through_serialized_library`, `mesh_pipeline_round_trips_through_serialized_library` and `warm_library::cold_publish_makes_an_unchanged_corpus_reusable` with `PoisonError`. All 10 `pipeline_library` / `warm_library` tests passed when rerun alone on the same merge. review: none blocking; whole diff read. `D3D12SerializeRootSignature` now strips console-only flag bits (anything outside `0xFFF`; seen: `0x3000000` from XboxBvhBuilder.dll) the same way `D3D12SerializeVersionedRootSignature` already did. Both go through one `serialize_root_sig`, which copies the 40-byte 1.0 desc (flags at +32) or the 48-byte versioned desc (flags at +40) before changing it, so the caller's desc is untouched. The test checks those sizes and offsets with `size_of` / `offset_of!`, and the reads are unaligned-safe. Dispatch is the same as the old `forward!` macro: the system export on the Real backend, otherwise `null::`. The failure log now names the entry point and reads parameters / samplers / flags at the right offsets for each version. One behaviour change: a non-null `err` is set to null on entry, so a caller's error pointer is always initialized; that matches the runtime's contract and the test covers it. The error blob is released only when the caller passed no `err`. performance: none to speak of (one 40/48-byte copy, only when console bits are set). Title run (release build of the merge, scratch/fast-world.py fast profile, about 85 s in world): exit 0, 0 crashes, 0 device removals, world entry 80.0 s, peak commit 31,227 MB, 68 WARN lines, `failed_pipelines` 0, no translation errors, no new WARN kinds against a main fa204595 run on the same harness (world entry 76.8 s, peak commit 33,027 MB, 86 WARN lines). This title only calls the versioned entry point: 17 "D3D12SerializeVersionedRootSignature: console flags 0x3000000 dropped" lines on both main and the merge, and no `D3D12SerializeRootSignature` call. So at run time the refactored versioned path behaves as before, and the new 1.0 stripping is covered only by the unit test. Both runs show 0 fps in the world because the cache doesn't match the translator identity. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74, wave32 only), AMD Ryzen 9 9950X, Windows 11 build 26200; rustc 1.99.0, debug test profile, release build for the title run, DXC 1.9.2609 via XCL_DXC_DIR. Claude Code, Claude Opus 5.5: merge, build, suite, title run and full-diff review; this report.
throny commented 2026-11-29 07:50:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T07:50:45Z.


merge-check claim
head: bd58663616

<!-- greyfinch-sync:ivall/xcl:comment:7252726847 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7252726847). Originally posted by [throny](https://github.com/throny) on 2026-11-29T07:50:45Z. --- merge-check claim head: bd58663616a18dd2dca7fb1850f0ab41d528a180
throny commented 2026-11-29 08:09:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T08:09:40Z.


merge-check
base: fa204595
head: bd58663616
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2609 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at fa204595: 2608 passed, 0 failed, 49 ignored.
review: no blocking finding. The flag stripping moves into one shared function and now also covers the 1.0 descriptor; offsets, copy sizes and the error-blob handling are right, and the caller's descriptor is not changed. One behaviour change: a caller's error pointer is now set to null before the call, as the null backend already did. Two notes on the test: it creates the process-wide real device inside a unit test (with the null backend configured it would fail on E_NOTIMPL), and it asserts what the system's d3d12.dll does with an unknown version and a null descriptor, which may differ between Windows builds. It passed here on Windows 11 26300.
performance: none expected (one small copy per serialize call); not measured.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7252924595 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#issuecomment-7252924595). Originally posted by [throny](https://github.com/throny) on 2026-11-29T08:09:40Z. --- merge-check base: fa204595 head: bd58663616a18dd2dca7fb1850f0ab41d528a180 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2609 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at fa204595: 2608 passed, 0 failed, 49 ignored. review: no blocking finding. The flag stripping moves into one shared function and now also covers the 1.0 descriptor; offsets, copy sizes and the error-blob handling are right, and the caller's descriptor is not changed. One behaviour change: a caller's error pointer is now set to null before the call, as the null backend already did. Two notes on the test: it creates the process-wide real device inside a unit test (with the null backend configured it would fail on E_NOTIMPL), and it asserts what the system's d3d12.dll does with an unknown version and a null descriptor, which may differ between Windows builds. It passed here on Windows 11 26300. performance: none expected (one small copy per serialize call); not measured. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
bmjask commented 2026-11-29 13:57:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T13:57:42Z.

Review: COMMENTED


Code review of head bd58663 — no blocking finding in the change.

I checked the 40-byte and 48-byte descriptor copies, flag offsets, preservation of caller memory, forwarding of the error-blob pointer, and release of an internally captured error blob. The test covers both serializer exports and success/failure handling. I did not run the Windows/WARP suite here; the results in the PR description are author reported.

<!-- greyfinch-sync:ivall/xcl:review:6103185466 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2447#pullrequestreview-6103185466). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-29T13:57:42Z. **Review:** COMMENTED --- Code review of head `bd58663` — no blocking finding in the change. I checked the 40-byte and 48-byte descriptor copies, flag offsets, preservation of caller memory, forwarding of the error-blob pointer, and release of an internally captured error blob. The test covers both serializer exports and success/failure handling. I did not run the Windows/WARP suite here; the results in the PR description are author reported.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2437
No description provided.