d3d12_xs: wire slot 50 DSV binding, view_slot<21> tracking, and stream PSO depth-stencil #1430

Manually merged
github merged 8 commits from gh-pr/1430/head into gh-pr/1430/base 2026-11-26 23:06:32 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:22 UTC · original
tedin7:x2w-h-gpu1a-dsv → main · +597 −35 · 7 files · 8 commits · merged 2026-11-24 12:31 UTC

Implements GPU-1A from proven console ABI facts:

  • Track DSV targets in view_slot<21, 2> via note_view_target().
  • Bind the 5th argument (depth handle) in list_targets (slot 50 OMSetRenderTargets), transition the backing resource to D3D12_RESOURCE_STATE_DEPTH_WRITE, track DSVFormat on Pass, and allow count == 0 depth-only passes when a valid DSV is bound.
  • Decode stream PSO subobjects 11 (DEPTH_STENCIL), 21 (DEPTH_STENCIL1), and 16 (DEPTH_STENCIL_FORMAT) in stream_translation() and include depth-stencil state + DSVFormat in pipeline_for() PSO cache keys.
  • Add startup_stream_depth + startup_stream_depth_check.py (WARP + hardware) testing depth occlusion, DepthEnable=FALSE negative control, and count=0 depth-only pass.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 11:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430) `tedin7:x2w-h-gpu1a-dsv` → `main` · +597 −35 · 7 files · 8 commits · merged 2026-11-24 12:31 UTC Implements GPU-1A from proven console ABI facts: - Track DSV targets in view_slot<21, 2> via note_view_target(). - Bind the 5th argument (depth handle) in list_targets (slot 50 OMSetRenderTargets), transition the backing resource to D3D12_RESOURCE_STATE_DEPTH_WRITE, track DSVFormat on Pass, and allow count == 0 depth-only passes when a valid DSV is bound. - Decode stream PSO subobjects 11 (DEPTH_STENCIL), 21 (DEPTH_STENCIL1), and 16 (DEPTH_STENCIL_FORMAT) in stream_translation() and include depth-stencil state + DSVFormat in pipeline_for() PSO cache keys. - Add startup_stream_depth + startup_stream_depth_check.py (WARP + hardware) testing depth occlusion, DepthEnable=FALSE negative control, and count=0 depth-only pass. AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:06:30 +00:00
github manually merged commit addc99c266 into gh-pr/1430/base 2026-11-26 23:06:32 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:29 UTC · original

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 7dbe5161:

  • Debug (--preset dev): ctest --preset dev -R '^(startup_stream_depth_warp|startup_stream_draw_warp|startup_cb_blend_warp|startup_mrt_fxc_warp|startup_mrt_dxc_warp)$' --no-tests=error --output-on-failure — 5/5 passed (4.89s)
  • Release /O2 (--preset release): ctest --preset release -R '^(startup_stream_depth_warp|startup_stream_draw_warp|startup_cb_blend_warp|startup_mrt_fxc_warp|startup_mrt_dxc_warp)$' --no-tests=error --output-on-failure — 5/5 passed (4.96s)
**@⁠tedin7** on GitHub · 2026-11-24 11:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7130157443) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `7dbe5161`: - **Debug (`--preset dev`)**: `ctest --preset dev -R '^(startup_stream_depth_warp|startup_stream_draw_warp|startup_cb_blend_warp|startup_mrt_fxc_warp|startup_mrt_dxc_warp)$' --no-tests=error --output-on-failure` — **5/5 passed** (4.89s) - **Release `/O2` (`--preset release`)**: `ctest --preset release -R '^(startup_stream_depth_warp|startup_stream_draw_warp|startup_cb_blend_warp|startup_mrt_fxc_warp|startup_mrt_dxc_warp)$' --no-tests=error --output-on-failure` — **5/5 passed** (4.96s)
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 11:29 UTC · original · edited 2026-11-24 11:38 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T11:38:58.656581Z 7dbe516 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 11:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7130160999) · edited 2026-11-24 11:38 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"7dbe51617081949aabc9fe2c0ea880c0ab9fbb51","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T11:38:58.656581Z">2026-11-24T11:38:58.656581Z</relative-time> | `7dbe516` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 11:38 UTC · original

P1 Badge Preserve depth-read state when a read-only DSV is also sampled

When a depth texture is bound through a D3D12_DSV_FLAG_READ_ONLY_DEPTH DSV with depth writes disabled and is also sampled by the pixel shader, this unconditionally requests DEPTH_WRITE. The SRV handling in draw_translated() then replaces that state with only PIXEL_SHADER_RESOURCE, while the DSV remains bound. The resulting draw lacks the required DEPTH_READ state and violates D3D12 resource-state requirements. Track the DSV flags and preserve DEPTH_READ | PIXEL_SHADER_RESOURCE for this valid simultaneous-use case.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 11:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#discussion_r4679428124) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Preserve depth-read state when a read-only DSV is also sampled** When a depth texture is bound through a `D3D12_DSV_FLAG_READ_ONLY_DEPTH` DSV with depth writes disabled and is also sampled by the pixel shader, this unconditionally requests `DEPTH_WRITE`. The SRV handling in `draw_translated()` then replaces that state with only `PIXEL_SHADER_RESOURCE`, while the DSV remains bound. The resulting draw lacks the required `DEPTH_READ` state and violates D3D12 resource-state requirements. Track the DSV flags and preserve `DEPTH_READ | PIXEL_SHADER_RESOURCE` for this valid simultaneous-use case. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 11:38 UTC · original

P2 Badge Resolve DSV targets from current descriptor contents after copies

When a guest copies DSV A over a descriptor previously created for resource B using device slots 23 or 24, copy_descriptor_run() updates the desktop descriptor and note_copy() updates its shadow ID, but neither updates view_targets(). This lookup therefore still returns B: the code transitions B to DEPTH_WRITE while binding the copied descriptor for A, leaving the actual depth resource untransitioned. Copying into a fresh destination instead produces no target and skips depth-only passes. Resolve the resource through the current shadow record or propagate target tracking during descriptor copies.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 11:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#discussion_r4679428133) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Resolve DSV targets from current descriptor contents after copies** When a guest copies DSV A over a descriptor previously created for resource B using device slots 23 or 24, `copy_descriptor_run()` updates the desktop descriptor and `note_copy()` updates its shadow ID, but neither updates `view_targets()`. This lookup therefore still returns B: the code transitions B to `DEPTH_WRITE` while binding the copied descriptor for A, leaving the actual depth resource untransitioned. Copying into a fresh destination instead produces no target and skips depth-only passes. Resolve the resource through the current shadow record or propagate target tracking during descriptor copies. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
@ -0,0 +184,4 @@
const bool hardware = std::strcmp(argv[6], "hardware") == 0;
ComPtr<IDXGIAdapter> adapter;
if (const int rc = pick_adapter(hardware, adapter)) return rc;
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 11:38 UTC · original

P1 Badge Emit the required hardware metadata from the new fixture

For startup_stream_depth_hardware, the fixture selects an adapter but never reports its identity or driver; the Python wrapper ultimately prints only debug messages and the backend/result summary. Unlike the existing prepare_stream_pipeline() helper, this path therefore produces GPU evidence that cannot be attributed to the selected adapter, especially on multi-GPU systems. AGENTS.md requires GPU reports to identify the adapter, driver, Windows build, commit, and debug-layer status, so emit and preserve that metadata with these results.

AGENTS.md reference: AGENTS.md:L95-L96

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 11:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#discussion_r4679428139) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Emit the required hardware metadata from the new fixture** For `startup_stream_depth_hardware`, the fixture selects an adapter but never reports its identity or driver; the Python wrapper ultimately prints only debug messages and the backend/result summary. Unlike the existing `prepare_stream_pipeline()` helper, this path therefore produces GPU evidence that cannot be attributed to the selected adapter, especially on multi-GPU systems. `AGENTS.md` requires GPU reports to identify the adapter, driver, Windows build, commit, and debug-layer status, so emit and preserve that metadata with these results. AGENTS.md reference: [AGENTS.md:L95-L96](https://github.com/R0Y00/Xbox2Windows/blob/7dbe51617081949aabc9fe2c0ea880c0ab9fbb51/AGENTS.md#L95-L96) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:47 UTC · original

Fixed in 1a361114: DSV flags are read from the view record; a read-only depth view binds as DEPTH_READ, and a draw that samples the same texture keeps DEPTH_READ|PIXEL_SHADER_RESOURCE (sampled_state).

**@⁠tedin7** on GitHub · 2026-11-24 11:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#discussion_r4679520230) Fixed in 1a361114: DSV flags are read from the view record; a read-only depth view binds as DEPTH_READ, and a draw that samples the same texture keeps DEPTH_READ|PIXEL_SHADER_RESOURCE (sampled_state).
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:47 UTC · original

Fixed in 1a361114: the DSV (and RTV) is resolved from the descriptor's current shadow record, which note_copy carries across CopyDescriptors/CopyDescriptorsSimple, instead of the creation-time handle map.

**@⁠tedin7** on GitHub · 2026-11-24 11:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#discussion_r4679520528) Fixed in 1a361114: the DSV (and RTV) is resolved from the descriptor's current shadow record, which note_copy carries across CopyDescriptors/CopyDescriptorsSimple, instead of the creation-time handle map.
@ -0,0 +184,4 @@
const bool hardware = std::strcmp(argv[6], "hardware") == 0;
ComPtr<IDXGIAdapter> adapter;
if (const int rc = pick_adapter(hardware, adapter)) return rc;
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:47 UTC · original

Fixed in 1a361114: startup_stream_depth prints adapter, vendor/device ids and driver version, which the check script preserves in its output.

**@⁠tedin7** on GitHub · 2026-11-24 11:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#discussion_r4679520880) Fixed in 1a361114: startup_stream_depth prints adapter, vendor/device ids and driver version, which the check script preserves in its output.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:47 UTC · original

@⁠R0Y00 Addressed in 1a361114 (Win2025 WARP Debug and Release /O2: startup_stream_depth, startup_stream_draw, startup_cb_blend, startup_mrt_fxc, startup_mrt_dxc 5/5 pass each).

  • Slot 50 resolves RTV/DSV handles from the descriptor's current view record (kind and flags preserved, copies followed). A handle of the wrong kind refuses the whole bind, so nothing draws.
  • Read-only depth views bind as DEPTH_READ (kept when the texture is also sampled). A view with only one plane read-only is refused, since it needs per-plane states.
  • DEPTH_STENCIL1 with DepthBoundsTestEnable set is refused instead of dropping the bounds test.
  • New source-built controls in startup_stream_depth: RTV passed as depth, DSV passed as target, and bounds-enabled DEPTH_STENCIL1 each draw nothing. A read-only DSV does not occlude. The fixture now prints adapter, driver and ids.
**@⁠tedin7** on GitHub · 2026-11-24 11:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7130555458) @⁠R0Y00 Addressed in 1a361114 (Win2025 WARP Debug and Release /O2: startup_stream_depth, startup_stream_draw, startup_cb_blend, startup_mrt_fxc, startup_mrt_dxc 5/5 pass each). - Slot 50 resolves RTV/DSV handles from the descriptor's current view record (kind and flags preserved, copies followed). A handle of the wrong kind refuses the whole bind, so nothing draws. - Read-only depth views bind as DEPTH_READ (kept when the texture is also sampled). A view with only one plane read-only is refused, since it needs per-plane states. - DEPTH_STENCIL1 with DepthBoundsTestEnable set is refused instead of dropping the bounds test. - New source-built controls in startup_stream_depth: RTV passed as depth, DSV passed as target, and bounds-enabled DEPTH_STENCIL1 each draw nothing. A read-only DSV does not occlude. The fixture now prints adapter, driver and ids.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 12:18 UTC · original

@⁠R0Y00 Fixed in addc99c2: the depth-only PSO now uses a pixel shader that exports nothing, so it no longer declares SV_Target0 for the zero-RTV pass. The translator (tools/startup/gfx2hlsl.py) emits a void main for an export-less pixel shader. The warning-severity assertion in startup_stream_depth_check.py is unchanged. Win2025 (MSVC, D3D12 WARP): Debug (--preset dev) and Release /O2 (--preset release) both pass startup_stream_depth_warp and startup_stream_depth_hardware, 2/2 each. The VM has only WARP, so the _hardware test also ran on WARP there and the RTX 4060 Laptop result still needs your run. AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 12:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7131254306) @⁠R0Y00 Fixed in addc99c2: the depth-only PSO now uses a pixel shader that exports nothing, so it no longer declares SV_Target0 for the zero-RTV pass. The translator (tools/startup/gfx2hlsl.py) emits a void main for an export-less pixel shader. The warning-severity assertion in startup_stream_depth_check.py is unchanged. Win2025 (MSVC, D3D12 WARP): Debug (--preset dev) and Release /O2 (--preset release) both pass startup_stream_depth_warp and startup_stream_depth_hardware, 2/2 each. The VM has only WARP, so the _hardware test also ran on WARP there and the RTX 4060 Laptop result still needs your run. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠thepatrickworld on GitHub · 2026-11-24 12:20 UTC · original

Measured addc99c2 merged onto 03d4c69d (my merge dfb441a1, tree e67ec184, working tree clean), Windows 11 25H2 (26200.9974), DXC 1.9.2602.17.

startup_stream_depth_hardware and startup_stream_depth_warp both passed, three runs out of three:

  • hardware: adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 driver=32.0.32029.2010
  • warp: adapter=Microsoft Basic Render Driver vendor=1414 device=008c driver=10.0.26100.9818

With all three readbacks reported on the hardware backend:

hardware: depth LESS occluded far red (green), DepthEnable=FALSE overwrote (red), count=0 depth-only occluded far red (clear)

So the depth path holds on real hardware (AMD RX 9070 XT), not just WARP, including the DepthEnable=FALSE negative control and the count == 0 depth-only pass.

For context on the intermediate step: 883bc706 (the PS-less depth-only PSO) failed three runs out of three on both backends — the depth-only readback came back red on the left half (ff0000ff × 16) instead of all clear, so the far quad was no longer occluded. WARP failing too is what made it a fixture/shim question rather than an adapter one. The export-less pixel shader in the current head passes on both.

Your own verification and the CI both stay on WARP (_hardware$ is excluded), so as far as I can see in this thread this is the first real-adapter run of the entry.

One limitation, so the result is not read as more than it is: the D3D12 debug layer is not installed on this machine (0x887a002d, SDK component missing; the Graphics Tools optional feature is absent and its install is refused from my remote session with 0x80070005). The x2w-d3d12-debug sev=[012] assertion therefore had nothing to inspect. What passed is the pixel path — exact bytes on all three readbacks — not API validation.

**@⁠thepatrickworld** on GitHub · 2026-11-24 12:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7131294718) Measured `addc99c2` merged onto `03d4c69d` (my merge `dfb441a1`, tree `e67ec184`, working tree clean), Windows 11 25H2 (26200.9974), DXC 1.9.2602.17. `startup_stream_depth_hardware` and `startup_stream_depth_warp` both passed, three runs out of three: - hardware: `adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 driver=32.0.32029.2010` - warp: `adapter=Microsoft Basic Render Driver vendor=1414 device=008c driver=10.0.26100.9818` With all three readbacks reported on the hardware backend: ``` hardware: depth LESS occluded far red (green), DepthEnable=FALSE overwrote (red), count=0 depth-only occluded far red (clear) ``` So the depth path holds on real hardware (AMD RX 9070 XT), not just WARP, including the `DepthEnable=FALSE` negative control and the `count == 0` depth-only pass. For context on the intermediate step: `883bc706` (the PS-less depth-only PSO) failed three runs out of three on **both** backends — the depth-only readback came back red on the left half (`ff0000ff` × 16) instead of all clear, so the far quad was no longer occluded. WARP failing too is what made it a fixture/shim question rather than an adapter one. The export-less pixel shader in the current head passes on both. Your own verification and the CI both stay on WARP (`_hardware$` is excluded), so as far as I can see in this thread this is the first real-adapter run of the entry. One limitation, so the result is not read as more than it is: the D3D12 debug layer is not installed on this machine (`0x887a002d`, SDK component missing; the Graphics Tools optional feature is absent and its install is refused from my remote session with `0x80070005`). The `x2w-d3d12-debug sev=[012]` assertion therefore had nothing to inspect. What passed is the pixel path — exact bytes on all three readbacks — not API validation.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 12:23 UTC · original

Thanks @⁠thepatrickworld for testing addc99c2 on physical AMD Radeon RX 9070 XT hardware (3/3 pass across all three depth readbacks, including the DepthEnable=FALSE control and count=0 depth-only pass). Together with the Win2025 WARP runs (where the D3D12 debug layer is active and checked for zero sev=[012] messages), both the real-adapter pixel path and API validation are now covered.

**@⁠tedin7** on GitHub · 2026-11-24 12:23 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7131362520) Thanks @⁠thepatrickworld for testing `addc99c2` on physical AMD Radeon RX 9070 XT hardware (3/3 pass across all three depth readbacks, including the `DepthEnable=FALSE` control and `count=0` depth-only pass). Together with the Win2025 WARP runs (where the D3D12 debug layer is active and checked for zero `sev=[012]` messages), both the real-adapter pixel path and API validation are now covered.
Author
Owner

@⁠ChazY11 on GitHub · 2026-11-24 12:53 UTC · original

The depth negative control is genuinely sensitive — verified by forcing DepthEnable = TRUE

Independent reviewer, not the author. Reviewed addc99c2; nothing pushed to the branch. The mutation below was made
locally, rebuilt, reverted; working tree is clean.

Environment: Windows 11 build 26300.9974, MSVC 14.44.35207, SDK 10.0.26100, DXC 1.8.2502.11, RTX 5080 Laptop
(32.0.15.8142) for the hardware variant, in-box WARP 10.0.26100.9818 for warp.

cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error -R '^(startup_stream_depth|startup_stream_draw|startup_stream_setup)' -V

Unmodified branch — 4 of 4 pass, with the intended line on both backends:

warp:     depth LESS occluded far red (green), DepthEnable=FALSE overwrote (red), count=0 depth-only occluded far red (clear)
hardware: depth LESS occluded far red (green), DepthEnable=FALSE overwrote (red), count=0 depth-only occluded far red (clear)

and startup_stream_draw_{warp,hardware} still reports the same 32-pixel and swapped-shader numbers, so the PSO cache
key change did not disturb the existing draws.

Mutation — DepthEnable forced on after the DEPTH_STENCIL copy

     std::memcpy(&depth_stencil, stream + at + sizeof(type), sizeof(depth_stencil));
+    depth_stencil.DepthEnable = TRUE;  // injected fault for review
     has_depth_stencil = true;
startup_stream_depth_warp ........ ***Failed
startup_stream_depth_hardware .... ***Failed

Both fail. That is the property I wanted to check: the DepthEnable=FALSE case is not passing by accident, it really
depends on the decoded subobject reaching pso_for. A negative control that stayed green here would have meant the
case was testing something else.

One practical note from doing this: the recompile of d3d12_xs_device.cpp (which pulls in the .inl) is what makes the
mutation take effect, and the x2w-draw desktop pipeline ... (dsv %d, depth %d) line you added is exactly what made it
possible to confirm the fault reached the pipeline. Please keep that line.

Limits of my run

The hardware variant selects the first non-software adapter through X2W_SHIM_DRAW_ADAPTER, so on this machine it is
the NVIDIA RTX, not an Intel adapter — no Intel datapoint from me here.

Verdict

Reviewed addc99c2. Build clean, both new cases pass on WARP and on a physical adapter, the existing stream draws are
unchanged, and the depth negative control fails when the decoded state is forced. No objection from me.

**@⁠ChazY11** on GitHub · 2026-11-24 12:53 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#issuecomment-7132058926) ## The depth negative control is genuinely sensitive — verified by forcing `DepthEnable = TRUE` Independent reviewer, not the author. Reviewed `addc99c2`; nothing pushed to the branch. The mutation below was made locally, rebuilt, reverted; working tree is clean. Environment: Windows 11 build 26300.9974, MSVC 14.44.35207, SDK 10.0.26100, DXC 1.8.2502.11, RTX 5080 Laptop (32.0.15.8142) for the `hardware` variant, in-box WARP 10.0.26100.9818 for `warp`. ```powershell cmake --preset dev cmake --build --preset dev ctest --preset dev --no-tests=error -R '^(startup_stream_depth|startup_stream_draw|startup_stream_setup)' -V ``` Unmodified branch — 4 of 4 pass, with the intended line on both backends: ```text warp: depth LESS occluded far red (green), DepthEnable=FALSE overwrote (red), count=0 depth-only occluded far red (clear) hardware: depth LESS occluded far red (green), DepthEnable=FALSE overwrote (red), count=0 depth-only occluded far red (clear) ``` and `startup_stream_draw_{warp,hardware}` still reports the same 32-pixel and swapped-shader numbers, so the PSO cache key change did not disturb the existing draws. ### Mutation — `DepthEnable` forced on after the DEPTH_STENCIL copy ```diff std::memcpy(&depth_stencil, stream + at + sizeof(type), sizeof(depth_stencil)); + depth_stencil.DepthEnable = TRUE; // injected fault for review has_depth_stencil = true; ``` ```text startup_stream_depth_warp ........ ***Failed startup_stream_depth_hardware .... ***Failed ``` Both fail. That is the property I wanted to check: the `DepthEnable=FALSE` case is not passing by accident, it really depends on the decoded subobject reaching `pso_for`. A negative control that stayed green here would have meant the case was testing something else. One practical note from doing this: the recompile of `d3d12_xs_device.cpp` (which pulls in the `.inl`) is what makes the mutation take effect, and the `x2w-draw desktop pipeline ... (dsv %d, depth %d)` line you added is exactly what made it possible to confirm the fault reached the pipeline. Please keep that line. ### Limits of my run The `hardware` variant selects the first non-software adapter through `X2W_SHIM_DRAW_ADAPTER`, so on this machine it is the NVIDIA RTX, not an Intel adapter — no Intel datapoint from me here. ### Verdict Reviewed `addc99c2`. Build clean, both new cases pass on WARP and on a physical adapter, the existing stream draws are unchanged, and the depth negative control fails when the decoded state is forced. No objection from me.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 11:38 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7dbe516170

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 11:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#pullrequestreview-6038517311) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `7dbe516170` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 11:40 UTC · original · requested changes

The DSV registry needs to preserve view kind and flags. Slot 50 resolves the depth handle in the same untyped registry as RTV handles, then always requests DEPTH_WRITE, including for a read-only DSV. Validate DSV versus RTV on lookup and either model read-only planes or explicitly refuse them. Also check the trailing DepthBoundsTestEnable on DEPTH_STENCIL1: copying the base fields alone silently drops the bounds test. Please add source-built controls for those cases.

Independent Windows Release at 7dbe516: the six stream/MRT regressions passed. Both new depth tests failed on RTX 4060 Laptop and WARP with D3D12 diagnostic 679 in the count-zero pass: the pixel shader declares RTV 0 even though the pass binds no color target. Please use a depth-only shader for that control and retain the debug-layer assertion.

**@⁠R0Y00** on GitHub · 2026-11-24 11:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#pullrequestreview-6038533519) · **requested changes** The DSV registry needs to preserve view kind and flags. Slot 50 resolves the depth handle in the same untyped registry as RTV handles, then always requests DEPTH_WRITE, including for a read-only DSV. Validate DSV versus RTV on lookup and either model read-only planes or explicitly refuse them. Also check the trailing DepthBoundsTestEnable on DEPTH_STENCIL1: copying the base fields alone silently drops the bounds test. Please add source-built controls for those cases. Independent Windows Release at 7dbe516: the six stream/MRT regressions passed. Both new depth tests failed on RTX 4060 Laptop and WARP with D3D12 diagnostic 679 in the count-zero pass: the pixel shader declares RTV 0 even though the pass binds no color target. Please use a depth-only shader for that control and retain the debug-layer assertion.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 11:58 UTC · original · requested changes

At 1a36111 the previous wrong-kind and depth-bounds controls are present. Windows Release still reports D3D12 warning 679 for the zero-RTV pass on both WARP and RTX 4060 Laptop, so both new depth CTests fail and the six older stream/MRT draws pass. Please make the depth-only PSO stop declaring SV_Target0 and retain the assertion on warning severity.

**@⁠R0Y00** on GitHub · 2026-11-24 11:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#pullrequestreview-6038764538) · **requested changes** At 1a36111 the previous wrong-kind and depth-bounds controls are present. Windows Release still reports D3D12 warning 679 for the zero-RTV pass on both WARP and RTX 4060 Laptop, so both new depth CTests fail and the six older stream/MRT draws pass. Please make the depth-only PSO stop declaring SV_Target0 and retain the assertion on warning severity.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 12:30 UTC · original · approved these changes

Re-reviewed this exact revision. Windows Release stream depth and adjacent stream/MRT checks passed 8/8 on RTX and WARP. The depth-only shader no longer emits an RTV output, and the read-only depth, invalid view-role, and bounds controls remain covered.

**@⁠R0Y00** on GitHub · 2026-11-24 12:30 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1430#pullrequestreview-6039213722) · **approved these changes** Re-reviewed this exact revision. Windows Release stream depth and adjacent stream/MRT checks passed 8/8 on RTX and WARP. The depth-only shader no longer emits an RTV output, and the read-only depth, invalid view-role, and bounds controls remain covered.
This discussion has been locked. Commenting is limited to contributors.
No description provided.