D3D12.X: keep logic ops on pipelines whose render targets are all UINT #2856

Merged
tiagonleal merged 1 commit from upstream-pr/2856 into main 2026-11-29 13:58:17 +00:00
tiagonleal commented 2026-11-26 19:06:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-26T19:06:57Z.


sanitize_integer_rt_blend cleared LogicOpEnable together with BlendEnable on every integer render target. D3D12 on PC forbids blending on UINT and SINT targets, but logic ops are allowed on UINT targets, with BlendEnable FALSE and IndependentBlendEnable FALSE (slot 0's state then applies to every bound target). A console pipeline that ORs or XORs bit masks into a UINT target got plain overwrites on PC. The function came in with #1988, whose description gives no reason for clearing the logic op.

With IndependentBlendEnable FALSE, slot 0 now keeps its logic op when every bound target is UINT and the device reports D3D12_OPTIONS.OutputMergerLogicOp. BlendEnable is still cleared. Without that capability the logic op is cleared as before and a warning is logged once. A logic op on a set with any non-UINT target (SINT, float, UNORM, UNKNOWN) is now cleared too, also when no integer target is bound, because D3D12 rejects such a pipeline. The independent-blend path is unchanged.

Based on e120925e, the last main commit before #2555 (see Regression run).

Rebased onto main 309c3ec5. The probe now sits next to main's pipeline_library::activate, and main's new sanitize_integer_rt_blend call for the blend subobject of a pipeline stream also asks logic_op_supported().

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: probe_logic_op caches OutputMergerLogicOp at device creation; sanitize_integer_rt_blend takes logic_op_supported and keeps the logic op on all-UINT target sets; new is_uint_dxgi_format; the four callers pass the cached value
  • Tests logic_op_stays_on_uint_render_targets, logic_op_dropped_without_output_merger_logic_op and logic_op_dropped_unless_every_target_is_uint; the all-integer case of integer_rtv_blend_sanitization_clears_uint_sint_and_preserves_float now uses a SINT target

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09); debug tests, release build
  • cargo test -p xcl --lib pso_blend_and_tsharp_tests: 6 passed, 0 failed, 3 of 3 runs on e29306f4
  • With the production change reverted in the working tree (the old logic that clears the logic op on every integer target; the new parameter is kept and ignored), the same command gives 3 passed, 3 failed: logic_op_stays_on_uint_render_targets (real.rs:6732), logic_op_dropped_without_output_merger_logic_op (real.rs:6723) and logic_op_dropped_unless_every_target_is_uint (real.rs:6770). The other three tests in the module pass.
  • cargo test --workspace --no-fail-fast -- --test-threads=4, run twice on e29306f4: 1441 passed, 4 failed, 47 ignored both times (25 SKIPPED lines: 21 no wave64, 1 no heap windows, 3 recompiler cases refused as unsupported). The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (CreateComputePipelineState returns E_OUTOFMEMORY, 0x8007000E). They fail the same way on e120925e on this machine (cargo test -p xcl --lib fuzz_validate_and_gpu: 0 passed, 4 failed).
  • No test creates a graphics pipeline with a logic op. The e2e tests that run the test title under the debug layer create real graphics pipelines through the changed function (blend state without a logic op) and pass.
  • After the rebase onto main f9a0cb80 (head f013aeae): cargo test --workspace --no-fail-fast -- --test-threads=4, one run: 1463 passed, 4 failed, 47 ignored (25 SKIPPED lines). The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0 to _3, as before. The other results in this section are from the earlier heads named in them.
  • After the rebase onto main 309c3ec5 (head a9e51cc4): cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4, one run: 2141 passed, 4 failed, 48 ignored (25 SKIPPED lines). All 4 failures also fail on main 309c3ec5 on this machine (2138 passed, 4 failed, 48 ignored): the 4 gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_* (#1919 fixes them). The other results in this section are from the earlier heads named in them.

Regression run
scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e (Newer Retail Game), release builds of both commits in clean trees, main 309c3ec5 first, one run each, in one queue with this account's other PRs. Both runs had XCL_PREPARE=0 and the same warm DXIL cache. A warm-up run of main came before them and is not shown. A second run of main at the end of the queue showed 302 frames and a peak commit of 10988 MB, so differences of a few tens of frames between runs are noise here. main is slow for about the first minute of this title since #2959 (#3164 has the cause), which is why both runs show few frames.

main (309c3ec5):

xcl-smoke v1
commit: 309c3ec5a25ea231ddbe01f76748ab8ed3d9d953
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 389 (PresentX 389)
presents per 2 s (last 3): 26 29 10
device removals: 0
crashes: 0
peak commit: 11030 MB

This PR (a9e51cc4):

xcl-smoke v1
commit: a9e51cc4a56de0a61d1e9def7f2b4373e5b8991f
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 360 (PresentX 361)
presents per 2 s (last 3): 12 13 11
device removals: 0
crashes: 0
peak commit: 10724 MB

Not tested

  • Whether the retail title uses logic ops: not known, so this may change nothing there
  • No GPU test of a UINT pipeline with a logic op: the D3D12 rules were taken from the documentation, not checked against the debug layer or a driver
  • The path for an adapter without OutputMergerLogicOp is covered by a unit test only
  • Logic ops on float slots with IndependentBlendEnable TRUE are left as before
  • The first-launch shader preparation: both regression runs had XCL_PREPARE=0
  • AMD and Intel GPUs

AI use

  • Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5515742457 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-26T19:06:57Z. --- `sanitize_integer_rt_blend` cleared `LogicOpEnable` together with `BlendEnable` on every integer render target. D3D12 on PC forbids blending on UINT and SINT targets, but logic ops are allowed on UINT targets, with `BlendEnable` FALSE and `IndependentBlendEnable` FALSE (slot 0's state then applies to every bound target). A console pipeline that ORs or XORs bit masks into a UINT target got plain overwrites on PC. The function came in with #1988, whose description gives no reason for clearing the logic op. With `IndependentBlendEnable` FALSE, slot 0 now keeps its logic op when every bound target is UINT and the device reports `D3D12_OPTIONS.OutputMergerLogicOp`. `BlendEnable` is still cleared. Without that capability the logic op is cleared as before and a warning is logged once. A logic op on a set with any non-UINT target (SINT, float, UNORM, UNKNOWN) is now cleared too, also when no integer target is bound, because D3D12 rejects such a pipeline. The independent-blend path is unchanged. Based on `e120925e`, the last `main` commit before #2555 (see Regression run). *Rebased onto `main` `309c3ec5`.* The probe now sits next to `main`'s `pipeline_library::activate`, and `main`'s new `sanitize_integer_rt_blend` call for the blend subobject of a pipeline stream also asks `logic_op_supported()`. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: `probe_logic_op` caches `OutputMergerLogicOp` at device creation; `sanitize_integer_rt_blend` takes `logic_op_supported` and keeps the logic op on all-UINT target sets; new `is_uint_dxgi_format`; the four callers pass the cached value - Tests `logic_op_stays_on_uint_render_targets`, `logic_op_dropped_without_output_merger_logic_op` and `logic_op_dropped_unless_every_target_is_uint`; the all-integer case of `integer_rtv_blend_sanitization_clears_uint_sint_and_preserves_float` now uses a SINT target **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09); debug tests, release build - `cargo test -p xcl --lib pso_blend_and_tsharp_tests`: 6 passed, 0 failed, 3 of 3 runs on e29306f4 - With the production change reverted in the working tree (the old logic that clears the logic op on every integer target; the new parameter is kept and ignored), the same command gives 3 passed, 3 failed: `logic_op_stays_on_uint_render_targets` (real.rs:6732), `logic_op_dropped_without_output_merger_logic_op` (real.rs:6723) and `logic_op_dropped_unless_every_target_is_uint` (real.rs:6770). The other three tests in the module pass. - `cargo test --workspace --no-fail-fast -- --test-threads=4`, run twice on e29306f4: 1441 passed, 4 failed, 47 ignored both times (25 `SKIPPED` lines: 21 `no wave64`, 1 `no heap windows`, 3 recompiler cases refused as unsupported). The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3` (`CreateComputePipelineState` returns E_OUTOFMEMORY, 0x8007000E). They fail the same way on `e120925e` on this machine (`cargo test -p xcl --lib fuzz_validate_and_gpu`: 0 passed, 4 failed). - No test creates a graphics pipeline with a logic op. The e2e tests that run the test title under the debug layer create real graphics pipelines through the changed function (blend state without a logic op) and pass. - After the rebase onto `main` `f9a0cb80` (head `f013aeae`): `cargo test --workspace --no-fail-fast -- --test-threads=4`, one run: 1463 passed, 4 failed, 47 ignored (25 `SKIPPED` lines). The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` to `_3`, as before. The other results in this section are from the earlier heads named in them. - After the rebase onto `main` `309c3ec5` (head `a9e51cc4`): `cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4`, one run: 2141 passed, 4 failed, 48 ignored (25 `SKIPPED` lines). All 4 failures also fail on `main` `309c3ec5` on this machine (2138 passed, 4 failed, 48 ignored): the 4 `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_*` (#1919 fixes them). The other results in this section are from the earlier heads named in them. **Regression run** `scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e` (Newer Retail Game), release builds of both commits in clean trees, `main` `309c3ec5` first, one run each, in one queue with this account's other PRs. Both runs had `XCL_PREPARE=0` and the same warm DXIL cache. A warm-up run of `main` came before them and is not shown. A second run of `main` at the end of the queue showed 302 frames and a peak commit of 10988 MB, so differences of a few tens of frames between runs are noise here. `main` is slow for about the first minute of this title since #2959 (#3164 has the cause), which is why both runs show few frames. `main` (`309c3ec5`): ``` xcl-smoke v1 commit: 309c3ec5a25ea231ddbe01f76748ab8ed3d9d953 gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 389 (PresentX 389) presents per 2 s (last 3): 26 29 10 device removals: 0 crashes: 0 peak commit: 11030 MB ``` This PR (`a9e51cc4`): ``` xcl-smoke v1 commit: a9e51cc4a56de0a61d1e9def7f2b4373e5b8991f gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 360 (PresentX 361) presents per 2 s (last 3): 12 13 11 device removals: 0 crashes: 0 peak commit: 10724 MB ``` **Not tested** - Whether the retail title uses logic ops: not known, so this may change nothing there - No GPU test of a UINT pipeline with a logic op: the D3D12 rules were taken from the documentation, not checked against the debug layer or a driver - The path for an adapter without `OutputMergerLogicOp` is covered by a unit test only - Logic ops on float slots with `IndependentBlendEnable` TRUE are left as before - The first-launch shader preparation: both regression runs had `XCL_PREPARE=0` - AMD and Intel GPUs **AI use** - Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot] commented 2026-11-26 19:07:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-26T19:07:06Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

<!-- greyfinch-sync:ivall/xcl:review:6079321770 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#pullrequestreview-6079321770). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-26T19:07:06Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level. An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. [Learn about Copilot code review billing](https://docs.github.com/en/copilot/concepts/agents/code-review#code-review-usage).
Decodere commented 2026-11-26 20:27:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T20:27:20Z.


Independent desktop NVIDIA verification of PR #2856 at head e29306f4b1e3dce921d03bef69c7c7f59ee441fd (1 commit; exact parent & merge-base: e120925e3abc9956a8b9bae631969d32e8ccd43c, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (e29306f4)

Command Result
cargo test --release -p xcl --lib logic_op_dropped_without_output_merger_logic_op -- --nocapture 1 passed; 0 failed; 0 ignored; 1344 filtered out (0.00s)
cargo test --release -p xcl --lib logic_op_stays_on_uint_render_targets -- --nocapture 1 passed; 0 failed; 0 ignored; 1344 filtered out (0.00s)
cargo test --release -p xcl --lib logic_op_dropped_unless_every_target_is_uint -- --nocapture 1 passed; 0 failed; 0 ignored; 1344 filtered out (0.00s)
cargo test --release -p xcl --lib hle::d3d12x::real:: (3 consecutive runs) 66 passed; 0 failed; 0 ignored; 1279 filtered out × 3 (0.35s, 0.36s, 0.36s)
cargo build --release -p xcl --bin xcl Clean build (1m 09s, exit 0)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (e120925e3abc9956a8b9bae631969d32e8ccd43c, cached baseline on the same machine):

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

PR #2856 (e29306f4b1e3dce921d03bef69c7c7f59ee441fd):

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

Runtime log observations (xcl.log)

  • 9223 log lines, 0 [ERROR] / device-removal / panic lines, and 0 OutputMergerLogicOp logic-op drop warnings.
  • probe_logic_op(&device) ran cleanly during real RTX 4060 D3D12 device initialization.
  • Final draw/memory telemetry in log: 19561 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 13971 MB committed by the process; video memory 6115 MB local, 4650 MB non-local.

Limits of coverage

  • The 60 s retail smoke on title: 29640639 exercises real RTX 4060 device initialization (probe_logic_op) and confirms zero regression across translated pipelines, draws, and dispatches, but the 60 s menu capture was not confirmed to create an active all-UINT LogicOpEnable pipeline on GPU (no on-GPU readback of a UINT bitwise logic-op render pass was run). Preservation on all-UINT render targets, dropping on SINT / mixed / non-UINT targets, and the D3D12_OPTIONS.OutputMergerLogicOp capability gate were verified via the 3 new unit tests and 3× full hle::d3d12x::real:: runs (66/0/0).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7202703510 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#issuecomment-7202703510). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T20:27:20Z. --- Independent desktop NVIDIA verification of **PR #2856** at head `e29306f4b1e3dce921d03bef69c7c7f59ee441fd` (`1` commit; exact parent & merge-base: `e120925e3abc9956a8b9bae631969d32e8ccd43c`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`e29306f4`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib logic_op_dropped_without_output_merger_logic_op -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1344 filtered out` (`0.00s`) | | `cargo test --release -p xcl --lib logic_op_stays_on_uint_render_targets -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1344 filtered out` (`0.00s`) | | `cargo test --release -p xcl --lib logic_op_dropped_unless_every_target_is_uint -- --nocapture` | `1 passed; 0 failed; 0 ignored; 1344 filtered out` (`0.00s`) | | `cargo test --release -p xcl --lib hle::d3d12x::real::` (3 consecutive runs) | `66 passed; 0 failed; 0 ignored; 1279 filtered out` × 3 (`0.35s`, `0.36s`, `0.36s`) | | `cargo build --release -p xcl --bin xcl` | Clean build (`1m 09s`, exit `0`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`e120925e3abc9956a8b9bae631969d32e8ccd43c`, cached baseline on the same machine): ``` xcl-smoke v1 commit: e120925e3abc9956a8b9bae631969d32e8ccd43c gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1602 (PresentX 1602) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13979 MB ``` PR #2856 (`e29306f4b1e3dce921d03bef69c7c7f59ee441fd`): ``` xcl-smoke v1 commit: e29306f4b1e3dce921d03bef69c7c7f59ee441fd gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1608 (PresentX 1608) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 13972 MB ``` ### Runtime log observations (`xcl.log`) - `9223` log lines, `0` `[ERROR]` / device-removal / panic lines, and `0` `OutputMergerLogicOp` logic-op drop warnings. - `probe_logic_op(&device)` ran cleanly during real RTX 4060 D3D12 device initialization. - Final draw/memory telemetry in log: `19561 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `13971 MB committed by the process; video memory 6115 MB local, 4650 MB non-local`. ### Limits of coverage - The 60 s retail smoke on `title: 29640639` exercises real RTX 4060 device initialization (`probe_logic_op`) and confirms zero regression across translated pipelines, draws, and dispatches, but the 60 s menu capture was not confirmed to create an active all-UINT `LogicOpEnable` pipeline on GPU (no on-GPU readback of a UINT bitwise logic-op render pass was run). Preservation on all-UINT render targets, dropping on SINT / mixed / non-UINT targets, and the `D3D12_OPTIONS.OutputMergerLogicOp` capability gate were verified via the 3 new unit tests and 3× full `hle::d3d12x::real::` runs (`66/0/0`). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
cindertheblue commented 2026-11-27 17:49:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cindertheblue on 2026-11-27T17:49:16Z.


Smoke pair for Regression run, head f013aeae and main 6089122a, the same title, 60 s each: no device removals or crashes, 103 % of main's frames (1,397 vs 1,353), 100 % of its peak commit (14,195 vs 14,188 MB). With both blocks pasted under Regression run, main's scripts/pr_check.py reports description ok for this head and the current description.

main 6089122a:

xcl-smoke v1
commit: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102
gpu: AMD Radeon RX 7600 XT
title: e7eb0b27
seconds: 60
exit: 0x0
frames shown: 1353 (PresentX 1353)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14188 MB

This PR's head f013aeae:

xcl-smoke v1
commit: f013aeaeb23249c9ff525c25abaead072adc8f21
gpu: AMD Radeon RX 7600 XT
title: e7eb0b27
seconds: 60
exit: 0x0
frames shown: 1397 (PresentX 1397)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14195 MB

Tested

  • AMD Radeon RX 7600 XT 16 GB (RDNA3), driver 32.0.31041.1004, Ryzen 5 9600X, 15.1 GB RAM, Windows 11 Home 26200.9974, rustc 1.99.1, release builds (cargo build --release -p xcl) of both commits from clean worktrees.
  • Each run used its own tree's scripts\smoke.ps1 -Seconds 60 -StartupTimeoutSeconds 1800, with XCL_ADAPTER=7600 and XCL_PREPARE=0 (both logs: Shader preparation left out (XCL_PREPARE=0)).
  • Each run had an empty DXIL cache and data root of its own, and a renamed copy of its xcl.exe, so AMD's per-app driver cache was cold for both.

Not tested

  • The code this PR changes: I did not check whether the title made a pipeline with a logic op and all-UINT render targets in these 60 s (the log does not say), nor the rendered output.
  • A run with the startup preparation (without XCL_PREPARE=0), longer play, the test suite on this head.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the pair on this machine and wrote this comment from the two runs' output.
<!-- greyfinch-sync:ivall/xcl:comment:7224821264 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#issuecomment-7224821264). Originally posted by [cindertheblue](https://github.com/cindertheblue) on 2026-11-27T17:49:16Z. --- Smoke pair for **Regression run**, head `f013aeae` and `main` `6089122a`, the same title, 60 s each: no device removals or crashes, 103 % of `main`'s frames (1,397 vs 1,353), 100 % of its peak commit (14,195 vs 14,188 MB). With both blocks pasted under **Regression run**, `main`'s `scripts/pr_check.py` reports `description ok` for this head and the current description. `main` `6089122a`: ``` xcl-smoke v1 commit: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 gpu: AMD Radeon RX 7600 XT title: e7eb0b27 seconds: 60 exit: 0x0 frames shown: 1353 (PresentX 1353) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14188 MB ``` This PR's head `f013aeae`: ``` xcl-smoke v1 commit: f013aeaeb23249c9ff525c25abaead072adc8f21 gpu: AMD Radeon RX 7600 XT title: e7eb0b27 seconds: 60 exit: 0x0 frames shown: 1397 (PresentX 1397) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14195 MB ``` **Tested** - AMD Radeon RX 7600 XT 16 GB (RDNA3), driver 32.0.31041.1004, Ryzen 5 9600X, 15.1 GB RAM, Windows 11 Home 26200.9974, rustc 1.99.1, release builds (`cargo build --release -p xcl`) of both commits from clean worktrees. - Each run used its own tree's `scripts\smoke.ps1 -Seconds 60 -StartupTimeoutSeconds 1800`, with `XCL_ADAPTER=7600` and `XCL_PREPARE=0` (both logs: `Shader preparation left out (XCL_PREPARE=0)`). - Each run had an empty DXIL cache and data root of its own, and a renamed copy of its `xcl.exe`, so AMD's per-app driver cache was cold for both. **Not tested** - The code this PR changes: I did not check whether the title made a pipeline with a logic op and all-UINT render targets in these 60 s (the log does not say), nor the rendered output. - A run with the startup preparation (without `XCL_PREPARE=0`), longer play, the test suite on this head. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the pair on this machine and wrote this comment from the two runs' output.
Kalmarv commented 2026-11-29 03:56:50 +00:00 (Migrated from github.com)

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


merge-check
base: fa204595a4
head: a9e51cc4a5
merge: clean (trial merge 9388f10132f5e192f87f355687d1c3fb5399c901, local, not pushed; real.rs auto-merged; git diff --check clean; every sanitize_integer_rt_blend call on current main gets the new argument)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2610 passed, 2 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 three new tests passed: logic_op_dropped_without_output_merger_logic_op, logic_op_stays_on_uint_render_targets, logic_op_dropped_unless_every_target_is_uint (plus the changed Case 3). Both failures are gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (one test, counted twice), a known load flake of that driver-cache test, which this PR doesn't touch; it passed when rerun alone on the same merge.
review: none blocking; whole diff read. PC D3D12 accepts LogicOpEnable only when independent blend is off, every bound target is *_UINT, and the device reports OutputMergerLogicOp. That's what this keeps: slot 0's logic op stays in exactly that case (its BlendEnable is cleared, since PC can't have both), and it's dropped everywhere else. Dropping it now also covers float-only target sets, which main passed through untouched. With independent blend on, integer slots lose blend and logic op as before. A mixed integer / float set with blending on slot 0 is still promoted to independent blend. probe_logic_op runs once in init_with_remap right after device creation (it's still there on current main), and until it has run logic_op_supported() is false, which drops logic ops: the safe side. If a device lacks the feature, a warning is logged once. An UNKNOWN slot inside NumRenderTargets counts as not UINT, which is conservative.
performance: none (a few comparisons at pipeline creation, one feature query at startup). 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 85.5 s, peak commit 31,634 MB, failed_pipelines 0, no translation errors. 153 WARN lines against 86 on a main fa204595 run on the same harness (world entry 76.8 s, peak commit 33,027 MB). The difference is 77 "video memory: N MB in use, N MB over the budget" lines: Windows gave this run a 12,330 MB budget because other title runs shared the GPU at the time. That and "running out of commit" are the only new WARN kinds, and both come from machine load. The log has no logic-op line: the once-only "no OutputMergerLogicOp" warning never fired, so either the device reports the feature or the title never asked for a logic op on all-UINT targets (I didn't log which). 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:7250355302 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#issuecomment-7250355302). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T03:56:50Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: a9e51cc4a56de0a61d1e9def7f2b4373e5b8991f merge: clean (trial merge 9388f10132f5e192f87f355687d1c3fb5399c901, local, not pushed; real.rs auto-merged; `git diff --check` clean; every `sanitize_integer_rt_blend` call on current main gets the new argument) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2610 passed, 2 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 three new tests passed: `logic_op_dropped_without_output_merger_logic_op`, `logic_op_stays_on_uint_render_targets`, `logic_op_dropped_unless_every_target_is_uint` (plus the changed Case 3). Both failures are `gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (one test, counted twice), a known load flake of that driver-cache test, which this PR doesn't touch; it passed when rerun alone on the same merge. review: none blocking; whole diff read. PC D3D12 accepts `LogicOpEnable` only when independent blend is off, every bound target is `*_UINT`, and the device reports `OutputMergerLogicOp`. That's what this keeps: slot 0's logic op stays in exactly that case (its `BlendEnable` is cleared, since PC can't have both), and it's dropped everywhere else. Dropping it now also covers float-only target sets, which main passed through untouched. With independent blend on, integer slots lose blend and logic op as before. A mixed integer / float set with blending on slot 0 is still promoted to independent blend. `probe_logic_op` runs once in `init_with_remap` right after device creation (it's still there on current main), and until it has run `logic_op_supported()` is false, which drops logic ops: the safe side. If a device lacks the feature, a warning is logged once. An `UNKNOWN` slot inside `NumRenderTargets` counts as not UINT, which is conservative. performance: none (a few comparisons at pipeline creation, one feature query at startup). 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 85.5 s, peak commit 31,634 MB, `failed_pipelines` 0, no translation errors. 153 WARN lines against 86 on a main fa204595 run on the same harness (world entry 76.8 s, peak commit 33,027 MB). The difference is 77 "video memory: N MB in use, N MB over the budget" lines: Windows gave this run a 12,330 MB budget because other title runs shared the GPU at the time. That and "running out of commit" are the only new WARN kinds, and both come from machine load. The log has no logic-op line: the once-only "no OutputMergerLogicOp" warning never fired, so either the device reports the feature or the title never asked for a logic op on all-UINT targets (I didn't log which). 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 08:23:33 +00:00 (Migrated from github.com)

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


merge-check claim
head: a9e51cc4a5

<!-- greyfinch-sync:ivall/xcl:comment:7253074721 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#issuecomment-7253074721). Originally posted by [throny](https://github.com/throny) on 2026-11-29T08:23:33Z. --- merge-check claim head: a9e51cc4a56de0a61d1e9def7f2b4373e5b8991f
throny commented 2026-11-29 08:40:59 +00:00 (Migrated from github.com)

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


merge-check
base: d8bd9a38
head: a9e51cc4a5
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2621 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at d8bd9a38: 2618 passed, 0 failed, 49 ignored.
review: no blocking finding. The device's logic-op support is probed once at device init, and with independent blending off, slot 0's logic op is kept when every target is UINT and the device supports it. All six callers are updated and the new tests fail without the change. One behaviour change the description does not state: a pipeline whose targets are all float and that carries a logic op used to pass through untouched and now loses the logic op. That agrees with D3D12 on PC, which takes logic ops on UINT targets only, but it should be said. A target slot of unknown format also drops the logic op (the careful side).
performance: 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:7253263214 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#issuecomment-7253263214). Originally posted by [throny](https://github.com/throny) on 2026-11-29T08:40:59Z. --- merge-check base: d8bd9a38 head: a9e51cc4a56de0a61d1e9def7f2b4373e5b8991f merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2621 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at d8bd9a38: 2618 passed, 0 failed, 49 ignored. review: no blocking finding. The device's logic-op support is probed once at device init, and with independent blending off, slot 0's logic op is kept when every target is UINT and the device supports it. All six callers are updated and the new tests fail without the change. One behaviour change the description does not state: a pipeline whose targets are all float and that carries a logic op used to pass through untouched and now loses the logic op. That agrees with D3D12 on PC, which takes logic ops on UINT targets only, but it should be said. A target slot of unknown format also drops the logic op (the careful side). performance: 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:40 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Code review of head a9e51cc — no definite code defect found in the changed sanitizer or capability probe.

I traced all four sanitize_integer_rt_blend call sites and checked the all-UINT, mixed-format, independent-blend, and unsupported-capability branches. The unit tests exercise the intended struct transformations. The core new behavior still lacks a driver-level test: no test creates a graphics PSO with LogicOpEnable on a UINT target, and the smoke run does not establish that the title uses one. Please add a focused WARP/debug-layer or hardware PSO creation and draw test before treating the compatibility fix as validated. I could not run Windows/GPU tests here.

<!-- greyfinch-sync:ivall/xcl:review:6103185383 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2856#pullrequestreview-6103185383). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-29T13:57:40Z. **Review:** COMMENTED --- Code review of head `a9e51cc` — no definite code defect found in the changed sanitizer or capability probe. I traced all four `sanitize_integer_rt_blend` call sites and checked the all-UINT, mixed-format, independent-blend, and unsupported-capability branches. The unit tests exercise the intended struct transformations. The core new behavior still lacks a driver-level test: no test creates a graphics PSO with `LogicOpEnable` on a UINT target, and the smoke run does not establish that the title uses one. Please add a focused WARP/debug-layer or hardware PSO creation and draw test before treating the compatibility fix as validated. I could not run Windows/GPU tests here.
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!2856
No description provided.