D3D12.X: disable blending on typed integer color targets #2261

Closed
Swagi-REDACTED wants to merge 1 commit from upstream-pr/2271 into main
Swagi-REDACTED commented 2026-11-25 11:55:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Swagi-REDACTED on 2026-11-25T11:55:38Z.


PC D3D12 rejected an R8_UINT attachment with blending enabled during an integration run of A newer retail game (debug error 676, E_INVALIDARG). Disable blending on active typed integer color targets, expanding shared state so float/normalized attachments keep their effective blending. This addresses pipeline creation; the separate world-loading failure remains unresolved.

What is in it

  • real.rs: normalize translated graphics descriptions before their driver-cache key and two-pass MS/GS streams before native creation; CPU and synthetic GPU regressions.
  • README.md: document the supported mixed-target behavior and its validation limits.

Tested

  • RTX 3060 12 GB, driver 621.14 (32.0.16.2114); Ryzen 7 9800X3D, 16 GB RAM; Windows 11 build 26200; Rust stable MSVC 1.95.0; SDK DXC 1.9.2602.17.
  • Debug cargo test --locked -p xcl --lib integer_blend -- --test-threads=4: 5 passed, 0 failed, 0 ignored. Before the conversion, 4 failed and 1 passed; the native mixed-MRT descriptor returned 0x80070057. Afterward both native descriptor and stream APIs create the pipeline.
  • Debug cargo test --locked --workspace -- --test-threads=4: 1159 passed, 0 failed, 46 ignored; 25 explicit SKIPPED events (20 wave64, three unsupported per-lane f16 forms, one heap-windows-disabled fixture, one driver-cache measurement requiring Windows Developer Mode). Default runtime flags, NVIDIA selected.
  • An earlier overlapping suite attempt stopped at two end-to-end out-of-memory failures while a separate title run was active; the full successful rerun above had that title stopped.
  • cargo build --locked --release --workspace: passed on the clean committed head. Sixty-second title smokes below retain profile/menu rendering, without advancing into world loading.

Regression run
Main:

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: NVIDIA GeForce RTX 3060
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1249 (PresentX 1250)
presents per 2 s (last 3): 14 59 44
device removals: 0
crashes: 0
peak commit: 14346 MB

This PR's head:

xcl-smoke v1
commit: f73d97dbc3abbb708229abec4a7e56d2e5dc051a
gpu: NVIDIA GeForce RTX 3060
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1358 (PresentX 1359)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 12840 MB

Not tested

  • AMD/Intel GPUs, output pixel readback, or native creation of an emitted two-pass MS/GS fixture (the GPU fixture uses VS/PS; stream conversion has CPU coverage).
  • The smoke runs do not exercise the retail integer-target pipeline or establish 3D/world/prologue playability. The integration run that exposed the rejection included additional unmerged changes.

AI use

  • Codex, GPT-6 (exact serving variant not exposed): diagnosis, implementation, tests, read-only review and this report. All reported runs were executed on the hardware above. User-authored commit with Codex co-author.
<!-- greyfinch-sync:ivall/xcl:issue:5490838715 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271). Originally posted by [Swagi-REDACTED](https://github.com/Swagi-REDACTED) on 2026-11-25T11:55:38Z. --- PC D3D12 rejected an `R8_UINT` attachment with blending enabled during an integration run of **A newer retail game** (debug error 676, `E_INVALIDARG`). Disable blending on active typed integer color targets, expanding shared state so float/normalized attachments keep their effective blending. This addresses pipeline creation; the separate world-loading failure remains unresolved. **What is in it** - `real.rs`: normalize translated graphics descriptions before their driver-cache key and two-pass MS/GS streams before native creation; CPU and synthetic GPU regressions. - `README.md`: document the supported mixed-target behavior and its validation limits. **Tested** - RTX 3060 12 GB, driver 621.14 (32.0.16.2114); Ryzen 7 9800X3D, 16 GB RAM; Windows 11 build 26200; Rust stable MSVC 1.95.0; SDK DXC 1.9.2602.17. - Debug `cargo test --locked -p xcl --lib integer_blend -- --test-threads=4`: 5 passed, 0 failed, 0 ignored. Before the conversion, 4 failed and 1 passed; the native mixed-MRT descriptor returned `0x80070057`. Afterward both native descriptor and stream APIs create the pipeline. - Debug `cargo test --locked --workspace -- --test-threads=4`: 1159 passed, 0 failed, 46 ignored; 25 explicit SKIPPED events (20 wave64, three unsupported per-lane f16 forms, one heap-windows-disabled fixture, one driver-cache measurement requiring Windows Developer Mode). Default runtime flags, NVIDIA selected. - An earlier overlapping suite attempt stopped at two end-to-end out-of-memory failures while a separate title run was active; the full successful rerun above had that title stopped. - `cargo build --locked --release --workspace`: passed on the clean committed head. Sixty-second title smokes below retain profile/menu rendering, without advancing into world loading. **Regression run** Main: ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: NVIDIA GeForce RTX 3060 title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1249 (PresentX 1250) presents per 2 s (last 3): 14 59 44 device removals: 0 crashes: 0 peak commit: 14346 MB ``` This PR's head: ``` xcl-smoke v1 commit: f73d97dbc3abbb708229abec4a7e56d2e5dc051a gpu: NVIDIA GeForce RTX 3060 title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1358 (PresentX 1359) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 12840 MB ``` **Not tested** - AMD/Intel GPUs, output pixel readback, or native creation of an emitted two-pass MS/GS fixture (the GPU fixture uses VS/PS; stream conversion has CPU coverage). - The smoke runs do not exercise the retail integer-target pipeline or establish 3D/world/prologue playability. The integration run that exposed the rejection included additional unmerged changes. **AI use** - Codex, GPT-6 (exact serving variant not exposed): diagnosis, implementation, tests, read-only review and this report. All reported runs were executed on the hardware above. User-authored commit with Codex co-author.
DarkPanda69 commented 2026-11-25 13:05:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-25T12:20:05Z.


AMD run (listed as untested), plus an RTX 3060: the new pipeline test passes on both.

Head f73d97d applied on main 1a0bbe3, debug, Windows 11 Pro 26200, XCL_ADAPTER set to each card:

  • RX 9070 XT (RDNA4, driver 32.0.32029.2010): gpu_integer_blend_mixed_targets_create_a_pipeline ok, so the AMD driver accepts the pipeline with blending off on the integer targets. Whole gpu:: filter: 629 passed, 2 failed, 22 ignored, the same as on main; the 2 failures are the AMD fuzz seeds 722 and 1599 tracked in #2115.
  • RTX 3060 (driver 32.0.16.1088): the new test ok; gpu:: 631 passed, 0 failed, 22 ignored.

Not tested: output pixel readback, a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7162233403 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7162233403). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-25T12:20:05Z. --- AMD run (listed as untested), plus an RTX 3060: the new pipeline test passes on both. Head `f73d97d` applied on `main` `1a0bbe3`, debug, Windows 11 Pro 26200, `XCL_ADAPTER` set to each card: - **RX 9070 XT** (RDNA4, driver 32.0.32029.2010): `gpu_integer_blend_mixed_targets_create_a_pipeline` ok, so the AMD driver accepts the pipeline with blending off on the integer targets. Whole `gpu::` filter: 629 passed, 2 failed, 22 ignored, the same as on `main`; the 2 failures are the AMD fuzz seeds 722 and 1599 tracked in #2115. - **RTX 3060** (driver 32.0.16.1088): the new test ok; `gpu::` 631 passed, 0 failed, 22 ignored. Not tested: output pixel readback, a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
nnonno91 commented 2026-11-25 16:12:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-25T15:18:02Z.


Independent Windows test of f73d97dbc3abbb708229abec4a7e56d2e5dc051a. Confirmed the original blend state was rejected and the corrected mixed-target pipeline was accepted on both Radeon integrated graphics and RTX 5090.

Tested

  • Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Radeon integrated graphics (32.0.21042.62), RTX 5090 (32.0.16.1742), Rust 1.100.0 x64 MSVC, Windows SDK DXC/DXIL 1.8.2502.11. Unoptimized test profile.
  • Clean head, cargo test --locked -p xcl --lib integer_blend -- --nocapture --test-threads=1 on each selected adapter. Each run reported 5 passed, 0 failed, 0 ignored, and no logged skips. The GPU test created a pipeline with mixed integer and non-integer targets through the native descriptor and stream forms.
  • Added a temporary negative control to the GPU fixture. cargo test --locked -p xcl --lib gpu_integer_blend_mixed_targets_create_a_pipeline -- --nocapture --test-threads=1 reported 1 passed, 0 failed, 0 ignored, and no logged skips per adapter. Both logged 0x80070057 for the unnormalized native descriptor before successfully creating the corrected pipelines. Restored the clean checkout.

Not tested

Rendered pixel values, the parent revision, retail titles, or the full workspace suite.

AI use

OpenAI Codex (GPT-6.2 Sol) prepared and ran the tests, verified the results, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7166623074 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7166623074). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-25T15:18:02Z. --- Independent Windows test of `f73d97dbc3abbb708229abec4a7e56d2e5dc051a`. Confirmed the original blend state was rejected and the corrected mixed-target pipeline was accepted on both Radeon integrated graphics and RTX 5090. **Tested** - Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Radeon integrated graphics (32.0.21042.62), RTX 5090 (32.0.16.1742), Rust 1.100.0 x64 MSVC, Windows SDK DXC/DXIL 1.8.2502.11. Unoptimized test profile. - Clean head, `cargo test --locked -p xcl --lib integer_blend -- --nocapture --test-threads=1` on each selected adapter. Each run reported 5 passed, 0 failed, 0 ignored, and no logged skips. The GPU test created a pipeline with mixed integer and non-integer targets through the native descriptor and stream forms. - Added a temporary negative control to the GPU fixture. `cargo test --locked -p xcl --lib gpu_integer_blend_mixed_targets_create_a_pipeline -- --nocapture --test-threads=1` reported 1 passed, 0 failed, 0 ignored, and no logged skips per adapter. Both logged `0x80070057` for the unnormalized native descriptor before successfully creating the corrected pipelines. Restored the clean checkout. **Not tested** Rendered pixel values, the parent revision, retail titles, or the full workspace suite. **AI use** OpenAI Codex (GPT-6.2 Sol) prepared and ran the tests, verified the results, and wrote this report.
DavidM1911 commented 2026-11-25 18:04:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T17:09:16Z.


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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7169085259 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7169085259). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T17:09:16Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
andrewDoing commented 2026-11-27 00:09:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T00:09:45Z.


RTX 5070 mixed render-target readback for XCL PR #2271

A synthetic D3D12 draw on an NVIDIA GeForce RTX 5070 verified all 16 pixels of a 4 × 4 draw in both checked targets. The first RGBA8 pixel was [127, 0, 128, 127], consistent with half-alpha red blended over blue. The integer red channel read back exactly 3 at every pixel. PR #2271

The probe used a test-only overlay on PR head f73d97dbc3abbb708229abec4a7e56d2e5dc051a. It applied the PR’s unchanged descriptor normalizer to a shared blend state, created a native VS/PS pipeline, and drew a full-screen triangle into three bound targets. It checked slot 0 (R8G8B8A8_UNORM) within one quantization step and slot 2 (R8_UINT) exactly. Slot 1 (R16G16B16A16_FLOAT) was bound and unmeasured. The command list copied the two checked targets to a readback buffer and the probe waited for GPU completion before mapping it.

The focused run passed in 0.70 seconds with zero failures or skips. The log names the selected adapter. The experiment covers descriptor-based VS/PS rendering. Stream-based two-pass MS/GS output and retail gameplay remain unmeasured. Run log

AI use: OpenAI Codex prepared the synthetic readback fixture, ran it, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7206224075 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7206224075). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-27T00:09:45Z. --- # RTX 5070 mixed render-target readback for XCL PR #2271 A synthetic D3D12 draw on an NVIDIA GeForce RTX 5070 verified all 16 pixels of a 4 × 4 draw in both checked targets. The first RGBA8 pixel was `[127, 0, 128, 127]`, consistent with half-alpha red blended over blue. The integer red channel read back exactly `3` at every pixel. [PR #2271](https://github.com/xcl-dev/xcl/pull/2271) The probe used a test-only overlay on PR head `f73d97dbc3abbb708229abec4a7e56d2e5dc051a`. It applied the PR’s unchanged descriptor normalizer to a shared blend state, created a native VS/PS pipeline, and drew a full-screen triangle into three bound targets. It checked slot 0 (`R8G8B8A8_UNORM`) within one quantization step and slot 2 (`R8_UINT`) exactly. Slot 1 (`R16G16B16A16_FLOAT`) was bound and unmeasured. The command list copied the two checked targets to a readback buffer and the probe waited for GPU completion before mapping it. The focused run passed in 0.70 seconds with zero failures or skips. The log names the selected adapter. The experiment covers descriptor-based VS/PS rendering. Stream-based two-pass MS/GS output and retail gameplay remain unmeasured. [Run log](xcl-2271-pixels.log) AI use: OpenAI Codex prepared the synthetic readback fixture, ran it, and wrote this report.
JJAutoCompare commented 2026-11-27 00:27:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:27:45Z.


Tested: f73d97dbc3abbb708229abec4a7e56d2e5dc051a, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17, debug. cargo test --locked -j 2 -p xcl --lib --no-run, then the checked-in integer_blend_tests CPU cases: 4 passed. The Arc fixture gpu_integer_blend_mixed_targets_create_a_pipeline passed with XCL_ADAPTER=A770. Both native descriptor and stream APIs accepted the mixed UNORM, FLOAT and R8_UINT graphics pipeline. Zero failures, ignores or skips.

Not tested: Arc pixel readback, two-pass MS/GS emission, full suite or retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and wrote the report.

<!-- greyfinch-sync:ivall/xcl:comment:7206480223 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7206480223). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-27T00:27:45Z. --- **Tested:** `f73d97dbc3abbb708229abec4a7e56d2e5dc051a`, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17, debug. `cargo test --locked -j 2 -p xcl --lib --no-run`, then the checked-in `integer_blend_tests` CPU cases: 4 passed. The Arc fixture `gpu_integer_blend_mixed_targets_create_a_pipeline` passed with `XCL_ADAPTER=A770`. Both native descriptor and stream APIs accepted the mixed UNORM, FLOAT and R8_UINT graphics pipeline. Zero failures, ignores or skips. **Not tested:** Arc pixel readback, two-pass MS/GS emission, full suite or retail smoke. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran and reran the checks and wrote the report.
Foniass commented 2026-12-01 07:43:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:43:14Z.


Triage (#1607) – head f73d97d

Main already does this: sanitize_integer_rt_blend in hle/d3d12x/real.rs (commit 587d77be, merged with #1988) clears BlendEnable on *_UINT/*_SINT targets and, with IndependentBlendEnable false and mixed float/integer targets, copies slot 0 to all slots so float targets keep blending. It runs in pc_topology_type (called from translated_graphics_pso_once) and in the two-pass mesh stream builders, and it also handles LogicOpEnable, which normalize_integer_blend_targets here does not. The PR also conflicts with main.
Recommendation: close (superseded by main commit 587d77be).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304398939 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7304398939). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:43:14Z. --- **Triage (#1607)** – head f73d97d Main already does this: `sanitize_integer_rt_blend` in `hle/d3d12x/real.rs` (commit 587d77be, merged with #1988) clears `BlendEnable` on `*_UINT`/`*_SINT` targets and, with `IndependentBlendEnable` false and mixed float/integer targets, copies slot 0 to all slots so float targets keep blending. It runs in `pc_topology_type` (called from `translated_graphics_pso_once`) and in the two-pass mesh stream builders, and it also handles `LogicOpEnable`, which `normalize_integer_blend_targets` here does not. The PR also conflicts with main. Recommendation: close (superseded by main commit 587d77be). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:51:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:51:43Z.


Closing as superseded: this change is already on main (587d77be). main sanitize_integer_rt_blend clears BlendEnable on integer RTs and promotes shared blend to independent; called from pc_topology_type, the two-pass mesh builders and the pipeline-stream patch (real.rs)

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311754089 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2271#issuecomment-7311754089). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:51:43Z. --- Closing as superseded: this change is already on `main` (587d77be). main sanitize_integer_rt_blend clears BlendEnable on integer RTs and promotes shared blend to independent; called from pc_topology_type, the two-pass mesh builders and the pipeline-stream patch (real.rs) Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

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!2261
No description provided.