GPU: the depth bounds test reaches the host #158

Merged
r4tedx merged 4 commits from upstream-pr/158 into main 2026-11-25 22:48:02 +00:00
r4tedx commented 2026-11-24 01:01:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-24T01:01:35Z.


Rebased onto main 940d32f (2026-11-25); head b5c468f drops the mesh-dispatch test that started dxc, per the triage. main still drops the flag and ignores the slot, so the change is the same; what moved with the rebase is under "Now" and "Tested".

What

The README lists depth bounds as missing for the world. Two places dropped it:

  • the pipeline stream reader narrowed subobject 21 (D3D12_DEPTH_STENCIL_DESC1) to the plain description and discarded DepthBoundsTestEnable;
  • the list's 0x220 slot (OMSetDepthBounds) was ignored_state.

Now:

  • The flag is kept in the graphics state and in the pipeline cache name. Vertex and mesh pipelines that ask for the test are made from a stream with DEPTH_STENCIL1 (the mesh stream helper is generalised for both); others are made as before. Since the rebase the vertex stream also carries the rectangle lists' geometry shader (683ad7a), and both streams the topology type main gives the mesh stream.
  • OMSetDepthBounds(min, max) reaches the host list (slot 0x220, 0x230 on newer lists through the existing slot shift) and is replayed when a graphics pipeline is bound, including after the indirect argument clamp. Fresh and reset lists keep D3D12's 0..1.
  • Hosts without DepthBoundsTestSupported keep today's behaviour and warn once.

Not verified

No game files were used. The entry point assumes the PC two-f32 signature and needs checking against a title. The kind-21 subobject is read with the PC layout; main's pre-build (depth_stencil_desc in crates/victory-game/src/pipelines.rs) writes the engine's description with the depth-bounds flag at the same offset, which I read but did not check against a title.

Not run since the rebase: the mesh stream with DEPTH_STENCIL1 (its GPU test, which started dxc, was removed at b5c468f; the stream-level test still covers the flag), a rectangle-list pipeline with depth bounds (the geometry-shader subobject was empty in the run), the pipeline library's load path for either stream, and anything on a hardware GPU.

Tested

At 49dd080, synthetic only:

  • CI on this head is green (clippy, clippy with all features, cargo test --workspace --locked on the runner's WARP adapter).
  • Here on WARP (VICTORY_D3D12_WARP=1, --features diagnostics, --test-threads=1): cargo test -p victory-gpu 149 passed, 0 failed, 2 ignored. The draw test reported depth bounds supported and read back [0.25, 0.5, 0.25, 0.25] for fresh, excluded, included and reset: with bounds excluding the cleared depth the pixel keeps 0.5; with bounds including it, 0.25 is written. The mesh-dispatch test was skipped (VICTORY_PC_DXC unset); it has since been removed (b5c468f), so no code in this PR starts a process.
  • Both clippy commands are clean with -D warnings. cargo test -p xtask: 6 passed (policy included).

Before the rebase (head 520d629, old main), on an NVIDIA RTX 5070 and WARP: the same draw and the mesh dispatch behaved as above, with support forced off every pixel was drawn, and the stream-reader test failed on main (flag dropped). Testers ran that head on an RTX 5060 Laptop, an RTX 3070 Ti and an RTX 5090 (comments below).

Touches list.rs/draw.rs near #24 and host.rs near #32; neither implements depth bounds.

#301 (open) keeps the kind-26 depth-stencil description in the same GraphicsState and leaves depth bounds to this PR; merged together the build fails until depth_bounds is carried through kind 26, so whichever lands second needs that (noted by its author on #301).

AI-assisted; no game assets were used.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6572185668 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-24T01:01:35Z. --- **Rebased onto `main` `940d32f` (2026-11-25); head `b5c468f` drops the mesh-dispatch test that started `dxc`, per the triage.** `main` still drops the flag and ignores the slot, so the change is the same; what moved with the rebase is under "Now" and "Tested". ## What The README lists depth bounds as missing for the world. Two places dropped it: - the pipeline stream reader narrowed subobject 21 (`D3D12_DEPTH_STENCIL_DESC1`) to the plain description and discarded `DepthBoundsTestEnable`; - the list's `0x220` slot (`OMSetDepthBounds`) was `ignored_state`. Now: - The flag is kept in the graphics state and in the pipeline cache name. Vertex and mesh pipelines that ask for the test are made from a stream with `DEPTH_STENCIL1` (the mesh stream helper is generalised for both); others are made as before. Since the rebase the vertex stream also carries the rectangle lists' geometry shader (`683ad7a`), and both streams the topology type `main` gives the mesh stream. - `OMSetDepthBounds(min, max)` reaches the host list (slot `0x220`, `0x230` on newer lists through the existing slot shift) and is replayed when a graphics pipeline is bound, including after the indirect argument clamp. Fresh and reset lists keep D3D12's `0..1`. - Hosts without `DepthBoundsTestSupported` keep today's behaviour and warn once. ## Not verified No game files were used. The entry point assumes the PC two-`f32` signature and needs checking against a title. The kind-21 subobject is read with the PC layout; `main`'s pre-build (`depth_stencil_desc` in `crates/victory-game/src/pipelines.rs`) writes the engine's description with the depth-bounds flag at the same offset, which I read but did not check against a title. Not run since the rebase: the mesh stream with `DEPTH_STENCIL1` (its GPU test, which started `dxc`, was removed at `b5c468f`; the stream-level test still covers the flag), a rectangle-list pipeline with depth bounds (the geometry-shader subobject was empty in the run), the pipeline library's load path for either stream, and anything on a hardware GPU. ## Tested At `49dd080`, synthetic only: - CI on this head is green (clippy, clippy with all features, `cargo test --workspace --locked` on the runner's WARP adapter). - Here on WARP (`VICTORY_D3D12_WARP=1`, `--features diagnostics`, `--test-threads=1`): `cargo test -p victory-gpu` 149 passed, 0 failed, 2 ignored. The draw test reported depth bounds supported and read back `[0.25, 0.5, 0.25, 0.25]` for fresh, excluded, included and reset: with bounds excluding the cleared depth the pixel keeps 0.5; with bounds including it, 0.25 is written. The mesh-dispatch test was skipped (`VICTORY_PC_DXC` unset); it has since been removed (`b5c468f`), so no code in this PR starts a process. - Both clippy commands are clean with `-D warnings`. `cargo test -p xtask`: 6 passed (policy included). Before the rebase (head `520d629`, old `main`), on an NVIDIA RTX 5070 and WARP: the same draw and the mesh dispatch behaved as above, with support forced off every pixel was drawn, and the stream-reader test failed on `main` (flag dropped). Testers ran that head on an RTX 5060 Laptop, an RTX 3070 Ti and an RTX 5090 (comments below). Touches `list.rs`/`draw.rs` near #24 and `host.rs` near #32; neither implements depth bounds. #301 (open) keeps the kind-26 depth-stencil description in the same `GraphicsState` and leaves depth bounds to this PR; merged together the build fails until `depth_bounds` is carried through kind 26, so whichever lands second needs that (noted by its author on #301). AI-assisted; no game assets were used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jeremygold02 commented 2026-11-24 06:55:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:41:32Z.


Tested head 728a8e3c91e7a8417c36ac9863d15bfb1e2eb11a with cargo test -p victory-gpu --lib depth_bounds_test -- --test-threads=1: 3 passed, 0 failed (44 unrelated tests filtered out). The cases verify depth bounds reach host handling for a title draw and mesh dispatch, and that the depth-bounds flag changes stream state (depth_bounds_test.rs). This is unit coverage; no live GPU or title run was performed.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7122250382 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7122250382). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-24T04:41:32Z. --- Tested head `728a8e3c91e7a8417c36ac9863d15bfb1e2eb11a` with `cargo test -p victory-gpu --lib depth_bounds_test -- --test-threads=1`: **3 passed, 0 failed** (44 unrelated tests filtered out). The cases verify depth bounds reach host handling for a title draw and mesh dispatch, and that the depth-bounds flag changes stream state ([`depth_bounds_test.rs`](https://github.com/Marvisak/VIctory/blob/728a8e3c91e7a8417c36ac9863d15bfb1e2eb11a/crates/victory-gpu/src/pipeline/depth_bounds_test.rs)). This is unit coverage; no live GPU or title run was performed.
DeerSilver commented 2026-11-24 11:04:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DeerSilver on 2026-11-24T10:51:13Z.


Tested head 520d629 merged onto main ffe310e (clean merge) on NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1. No game files: the test suite only: pass.

  • The three new tests pass:
    • depth_bounds_flag_changes_the_stream_state
    • depth_bounds_control_a_title_draw
    • depth_bounds_control_a_title_mesh_dispatch
  • Both render tests ran on the RTX 5060 (DXGI adapter 0 on this laptop). In the default run the mesh one skips with VICTORY_PC_DXC is unset. I re-ran it with VICTORY_PC_DXC set to the Windows SDK's 10.0.26100.0\x64\dxc.exe, and it then ran on the GPU with no skip message. So depth bounds control both a draw and a mesh dispatch on NVIDIA.
  • cargo test --workspace --locked: 345 passed, 0 failed, 6 ignored, against 342 / 6 on main.
  • cargo clippy --workspace --all-targets --locked -- -D warnings: clean.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7129331598 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7129331598). Originally posted by [DeerSilver](https://github.com/DeerSilver) on 2026-11-24T10:51:13Z. --- Tested head `520d629` merged onto `main` `ffe310e` (clean merge) on **NVIDIA GeForce RTX 5060 Laptop GPU** (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1. No game files: the test suite only: **pass.** - The three new tests pass: - `depth_bounds_flag_changes_the_stream_state` - `depth_bounds_control_a_title_draw` - `depth_bounds_control_a_title_mesh_dispatch` - Both render tests ran on the RTX 5060 (DXGI adapter 0 on this laptop). In the default run the mesh one skips with `VICTORY_PC_DXC is unset`. I re-ran it with `VICTORY_PC_DXC` set to the Windows SDK's `10.0.26100.0\x64\dxc.exe`, and it then ran on the GPU with no skip message. So depth bounds control both a draw and a mesh dispatch on NVIDIA. - `cargo test --workspace --locked`: **345 passed, 0 failed, 6 ignored**, against 342 / 6 on `main`. - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean. AI-assisted (Claude Code).
465d6a0eac commented 2026-11-24 17:04:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by 465d6a0eac on 2026-11-24T16:28:59Z.


Thank you for this, @r4tedx! Many pull requests here are still waiting to be merged, so I've ported this one to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/27. You're credited as the author there. This pull request stays the original.

Test results

  • Windows 11, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088, 32-lane waves): cargo clippy (both variants) and cargo test --workspace pass (345 passed, 0 failed).
  • depth_bounds_control_a_title_draw passes on the GPU and reports depth bounds on NVIDIA GeForce RTX 3070 Ti: true; depth_bounds_control_a_title_mesh_dispatch was skipped here (no VICTORY_PC_DXC).
  • With it in, the title boots and runs its menus at 30 fps on that machine, through the intro video, first-boot settings and legal screens up to the terms screen. I haven't reached the world yet.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7137734765 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7137734765). Originally posted by [465d6a0eac](https://github.com/465d6a0eac) on 2026-11-24T16:28:59Z. --- Thank you for this, @r4tedx! Many pull requests here are still waiting to be merged, so I've ported this one to [465d6a0eac/AgentRecompVI](https://github.com/465d6a0eac/AgentRecompVI), a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/27. You're credited as the author there. This pull request stays the original. **Test results** - Windows 11, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088, 32-lane waves): `cargo clippy` (both variants) and `cargo test --workspace` pass (345 passed, 0 failed). - `depth_bounds_control_a_title_draw` passes on the GPU and reports `depth bounds on NVIDIA GeForce RTX 3070 Ti: true`; `depth_bounds_control_a_title_mesh_dispatch` was skipped here (no `VICTORY_PC_DXC`). - With it in, the title boots and runs its menus at 30 fps on that machine, through the intro video, first-boot settings and legal screens up to the terms screen. I haven't reached the world yet.
Marvisak commented 2026-11-25 01:07:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:18:27Z.


Automated triage for the maintainers.

Merge candidate. This is a recommendation to look, not an approval. It merges cleanly into main. CI: check passing.

The PR forwards the title's depth bounds to the host. Slot 68 (0x220, already labelled as depth bounds in list.rs) now calls State::set_depth_bounds, which uses OMSetDepthBounds, and the bounds are set again whenever a graphics pipeline is bound. GraphicsState keeps DepthBoundsTestEnable from subobject kind 21, which main drops with a shortcut comment. The flag is part of the pipeline key, and hosts that report DepthBoundsTestSupported build the pipeline from a stream with DEPTH_STENCIL1, for both mesh and vertex pipelines through the shared stream_pipeline.

What I checked: kind 11 clears the flag, State::reset returns the bounds to none, vertex pipelines with bounds still go through library::pipeline under a distinct name, and nothing in the PR starts a process now that the dxc test is gone. As the thread notes, the title does not enable the test on the window/fence pipeline from the RTX 3070 report, so that visual change probably came from another PR on that branch. The PR stands on its own as a missing capability.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148371712 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7148371712). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:18:27Z. --- <!-- victory-triage v1 head=1a45c5e3fc617e4dad12a2c908954b412445b138 verdict=merge-candidate at=2026-11-25T19:26:00Z --> Automated triage for the maintainers. **Merge candidate.** This is a recommendation to look, not an approval. It merges cleanly into `main`. CI: `check` passing. The PR forwards the title's depth bounds to the host. Slot 68 (0x220, already labelled as depth bounds in `list.rs`) now calls `State::set_depth_bounds`, which uses `OMSetDepthBounds`, and the bounds are set again whenever a graphics pipeline is bound. `GraphicsState` keeps `DepthBoundsTestEnable` from subobject kind 21, which `main` drops with a shortcut comment. The flag is part of the pipeline key, and hosts that report `DepthBoundsTestSupported` build the pipeline from a stream with `DEPTH_STENCIL1`, for both mesh and vertex pipelines through the shared `stream_pipeline`. What I checked: kind 11 clears the flag, `State::reset` returns the bounds to none, vertex pipelines with bounds still go through `library::pipeline` under a distinct name, and nothing in the PR starts a process now that the dxc test is gone. As the thread notes, the title does not enable the test on the window/fence pipeline from the RTX 3070 report, so that visual change probably came from another PR on that branch. The PR stands on its own as a missing capability. --- _Generated by [Claude Code](https://claude.ai/code)_
DenRakEiw commented 2026-11-25 03:33:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T03:33:59Z.

Review: COMMENTED


Tested PR head directly on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):

  • cargo test -p victory-gpu --lib depth_bounds — 3 passed, 0 failed on both RTX 5090 hardware and VICTORY_D3D12_WARP=1
  • cargo clippy -p victory-gpu --all-targets — 0 warnings
  • cargo xtask policy — ok
  • Merge status: Currently CONFLICTING with origin/main (940d32f). Once rebased onto main, happy to re-verify and approve!

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6051466659 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#pullrequestreview-6051466659). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T03:33:59Z. **Review:** COMMENTED --- Tested PR head directly on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC): - `cargo test -p victory-gpu --lib depth_bounds` — **3 passed, 0 failed** on both RTX 5090 hardware and `VICTORY_D3D12_WARP=1` - `cargo clippy -p victory-gpu --all-targets` — 0 warnings - `cargo xtask policy` — ok - **Merge status:** Currently `CONFLICTING` with `origin/main` (`940d32f`). Once rebased onto `main`, happy to re-verify and approve! AI-assisted (Gemini 4 Neon).
r4tedx commented 2026-11-25 05:06:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T04:33:49Z.


Rebased onto main 940d32f: head 49dd080, one commit, CI green. @DenRakEiw thanks for the run on the RTX 5090 and WARP, and for offering to re-verify; this is the head to check.

main still has no depth bounds of its own (kind 21 drops the flag, slot 0x220 is ignored_state), so the change is the same. Two things moved with the rebase, both in pipeline/host.rs:

  • the vertex stream used for a depth-bounds pipeline now carries the rectangle lists' geometry shader that main added (683ad7a), so such a pipeline keeps it;
  • vertex and mesh streams share the one topology subobject main added to the mesh stream.

Tested at 49dd080 on WARP only (VICTORY_D3D12_WARP=1, diagnostics build, one test thread): cargo test -p victory-gpu 149 passed, 0 failed, 2 ignored; the draw test read back [0.25, 0.5, 0.25, 0.25]. Not run since the rebase: the mesh-dispatch test (needs VICTORY_PC_DXC), a rectangle-list pipeline with depth bounds, and anything on a hardware GPU. A hardware run with VICTORY_PC_DXC set would cover the first and the last. The description has the details.

No game data was used. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152957359 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7152957359). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T04:33:49Z. --- Rebased onto `main` `940d32f`: head `49dd080`, one commit, CI green. @DenRakEiw thanks for the run on the RTX 5090 and WARP, and for offering to re-verify; this is the head to check. `main` still has no depth bounds of its own (kind 21 drops the flag, slot `0x220` is `ignored_state`), so the change is the same. Two things moved with the rebase, both in `pipeline/host.rs`: - the vertex stream used for a depth-bounds pipeline now carries the rectangle lists' geometry shader that `main` added (`683ad7a`), so such a pipeline keeps it; - vertex and mesh streams share the one topology subobject `main` added to the mesh stream. Tested at `49dd080` on WARP only (`VICTORY_D3D12_WARP=1`, diagnostics build, one test thread): `cargo test -p victory-gpu` 149 passed, 0 failed, 2 ignored; the draw test read back `[0.25, 0.5, 0.25, 0.25]`. Not run since the rebase: the mesh-dispatch test (needs `VICTORY_PC_DXC`), a rectangle-list pipeline with depth bounds, and anything on a hardware GPU. A hardware run with `VICTORY_PC_DXC` set would cover the first and the last. The description has the details. No game data was used. AI-assisted.
r4tedx commented 2026-11-25 07:03:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T06:24:21Z.


On the one open point of the triage: the external process is only in depth_bounds_control_a_title_mesh_dispatch. It runs dxc from VICTORY_PC_DXC to compile one mesh and one pixel shader written inline in the test, writes them to a temporary directory, and is skipped when the variable is unset, the same pattern as main's diff_tests.rs, flow_tests.rs and emit/mod.rs. Nothing else in the PR starts a process; the vertex-pipeline render test compiles in process with D3DCompile.

If you would rather not take new process-spawning code, I can drop that one test. What would remain for the mesh path is the stream-level check (depth_bounds_flag_changes_the_stream_state) and the shared stream_pipeline the vertex render test already exercises; the mesh dispatch itself would then be untested on a GPU. Say which you prefer and I will push it.

Nothing was run for this note. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154756457 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7154756457). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T06:24:21Z. --- On the one open point of the triage: the external process is only in `depth_bounds_control_a_title_mesh_dispatch`. It runs `dxc` from `VICTORY_PC_DXC` to compile one mesh and one pixel shader written inline in the test, writes them to a temporary directory, and is skipped when the variable is unset, the same pattern as main's `diff_tests.rs`, `flow_tests.rs` and `emit/mod.rs`. Nothing else in the PR starts a process; the vertex-pipeline render test compiles in process with `D3DCompile`. If you would rather not take new process-spawning code, I can drop that one test. What would remain for the mesh path is the stream-level check (`depth_bounds_flag_changes_the_stream_state`) and the shared `stream_pipeline` the vertex render test already exercises; the mesh dispatch itself would then be untested on a GPU. Say which you prefer and I will push it. Nothing was run for this note. AI-assisted.
r4tedx commented 2026-11-25 08:06:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T07:06:39Z.


I dropped the test that started dxc, as offered above, so nothing in this PR starts an external process now. New head b5c468f, one commit on top of 49dd080, no history rewritten.

What stays: depth_bounds_flag_changes_the_stream_state (stream key) and depth_bounds_control_a_title_draw (vertex pipeline drawn and read back, compiled in process with D3DCompile). The mesh path of the shared stream_pipeline is no longer exercised on a GPU by this PR.

Checked here: cargo clippy -p victory-gpu --all-targets with and without --all-features, -D warnings, clean. The tests were not rerun locally; CI runs them on WARP for this head.

Note for merge order: this PR and #159 both edit the same README row (GPU: world). Each merges cleanly into main on its own; whichever lands second will need that one line resolved, and I'll do it right away.

AI-assisted; no game data used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155498840 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7155498840). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T07:06:39Z. --- I dropped the test that started `dxc`, as offered above, so nothing in this PR starts an external process now. New head `b5c468f`, one commit on top of `49dd080`, no history rewritten. What stays: `depth_bounds_flag_changes_the_stream_state` (stream key) and `depth_bounds_control_a_title_draw` (vertex pipeline drawn and read back, compiled in process with `D3DCompile`). The mesh path of the shared `stream_pipeline` is no longer exercised on a GPU by this PR. Checked here: `cargo clippy -p victory-gpu --all-targets` with and without `--all-features`, `-D warnings`, clean. The tests were not rerun locally; CI runs them on WARP for this head. Note for merge order: this PR and #159 both edit the same README row (GPU: world). Each merges cleanly into `main` on its own; whichever lands second will need that one line resolved, and I'll do it right away. AI-assisted; no game data used.
Slay326 commented 2026-11-25 17:05:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Slay326 on 2026-11-25T16:25:20Z.


Hardware test: this fixes a visible error on an RTX 3070. RTX 3070 (8 GB, 32-lane waves), Windows 11, Series X mode, 480 s runs into the world of Grand Theft Auto VI 1.0.2.1. Local test branch: main 940d32f plus #1906, #1890, #1883, #1962, #1779, #1763, #1762, a page-mark guard like #2167 and the memory PRs #2129, #2180, #1873, #1969, #2161.

Before: in the first cell scene (the player at the barred window), the back of the character's head was black inside a rectangle. A target dump showed the alpha prepass of the window/fence (mesh 0c6c5a3a, pixel 629743ca) writing a full rectangle into the main depth target, over the nearer head; the hair was black exactly inside that rectangle.

With this PR (merged on the branch above; one conflict in host.rs, both sides kept, plus the heap_usage field from #1962 in the test's state): the head and ponytail show in full in the same scene. 640 s run, no device removal. victory-gpu: both depth-bounds tests pass.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7167955140 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7167955140). Originally posted by [Slay326](https://github.com/Slay326) on 2026-11-25T16:25:20Z. --- Hardware test: this fixes a visible error on an RTX 3070. RTX 3070 (8 GB, 32-lane waves), Windows 11, Series X mode, 480 s runs into the world of Grand Theft Auto VI 1.0.2.1. Local test branch: main 940d32f plus #1906, #1890, #1883, #1962, #1779, #1763, #1762, a page-mark guard like #2167 and the memory PRs #2129, #2180, #1873, #1969, #2161. **Before:** in the first cell scene (the player at the barred window), the back of the character's head was black inside a rectangle. A target dump showed the alpha prepass of the window/fence (mesh `0c6c5a3a`, pixel `629743ca`) writing a full rectangle into the main depth target, over the nearer head; the hair was black exactly inside that rectangle. **With this PR** (merged on the branch above; one conflict in `host.rs`, both sides kept, plus the `heap_usage` field from #1962 in the test's state): the head and ponytail show in full in the same scene. 640 s run, no device removal. `victory-gpu`: both depth-bounds tests pass. AI-assisted.
Venom2054 commented 2026-11-25 17:05:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Venom2054 on 2026-11-25T16:46:51Z.


Title-side depth-bounds data for b5c468f on native Windows 11, RTX 5070 Ti (621.01). I compared the same 940d32f-based prologue build (including #2311 and #2349), save, scripted input and starting cache, with and without this PR. The PR run had two logging probes, one at set_depth_bounds and one at graphics pipeline creation. Both runs reached the cell window and completed a 330 s observation without device removal.

  • The title called set_depth_bounds with (0.0, 1.0) first. After world entry the first non-default pair was approximately (0.000047207, 0.000277936). These are the values received as two f32s by this build.
  • The host reported depth bounds supported. I saw an enabled request for a vertex pipeline. For the window/fence mesh and pixel pair identified in the RTX 3070 report (0c6c5a3a / 629743ca), the one pipeline creation I observed had DepthBoundsTestEnable = false. The head remained a dark silhouette in both runs, so I couldn't isolate the reported rectangular occlusion on this integration. That flag would be worth comparing on the build that showed the change.
  • Both PR tests passed on the RTX. The draw test read back [0.25, 0.5, 0.25, 0.25] (fresh, excluded, included, reset).

As a separate visual control I tried only the rectangle shader from #2366 (d29e14f) on the same baseline. In three captures of the settled courtyard, the same upper edge had three sawtooth jumps of at least 24 px on the baseline and with #158 alone, and zero with #2366 alone. The result held at three brightness thresholds. This separates the triangles around the opening from the dark silhouette on this setup.

Tested with OpenAI Codex assistance.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7168520293 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7168520293). Originally posted by [Venom2054](https://github.com/Venom2054) on 2026-11-25T16:46:51Z. --- Title-side depth-bounds data for `b5c468f` on native Windows 11, RTX 5070 Ti (621.01). I compared the same `940d32f`-based prologue build (including #2311 and #2349), save, scripted input and starting cache, with and without this PR. The PR run had two logging probes, one at `set_depth_bounds` and one at graphics pipeline creation. Both runs reached the cell window and completed a 330 s observation without device removal. - The title called `set_depth_bounds` with `(0.0, 1.0)` first. After world entry the first non-default pair was approximately `(0.000047207, 0.000277936)`. These are the values received as two `f32`s by this build. - The host reported depth bounds supported. I saw an enabled request for a vertex pipeline. For the window/fence mesh and pixel pair identified in the RTX 3070 report (`0c6c5a3a` / `629743ca`), the one pipeline creation I observed had `DepthBoundsTestEnable = false`. The head remained a dark silhouette in both runs, so I couldn't isolate the reported rectangular occlusion on this integration. That flag would be worth comparing on the build that showed the change. - Both PR tests passed on the RTX. The draw test read back `[0.25, 0.5, 0.25, 0.25]` (fresh, excluded, included, reset). As a separate visual control I tried only the rectangle shader from #2366 (`d29e14f`) on the same baseline. In three captures of the settled courtyard, the same upper edge had three sawtooth jumps of at least 24 px on the baseline and with #158 alone, and zero with #2366 alone. The result held at three brightness thresholds. This separates the triangles around the opening from the dark silhouette on this setup. Tested with OpenAI Codex assistance.
r4tedx commented 2026-11-25 17:05:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T16:49:54Z.


@Venom2054 thank you, especially for the two probes. The DepthBoundsTestEnable = false you saw on the window/fence pair is the comparison to make next.

Our own runs on an RTX 5070 can't answer that yet. Our layer builds carry an older head of this PR (49dd080), and the same window/fence pipeline is created in every run, but no build of ours logs the depth-bounds flag per pipeline. A coming build adds that field to the pipeline line. When it has run, I'll post the enable flag and the bounds pair for that pipeline here, so it can be set next to your 5070 Ti numbers and Slay326's 3070 result.

The runs mentioned here were runs of the title on my PC with my own local copy of its data; only logged flags and values will be quoted.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7168597442 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7168597442). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T16:49:54Z. --- @Venom2054 thank you, especially for the two probes. The `DepthBoundsTestEnable = false` you saw on the window/fence pair is the comparison to make next. Our own runs on an RTX 5070 can't answer that yet. Our layer builds carry an older head of this PR (`49dd080`), and the same window/fence pipeline is created in every run, but no build of ours logs the depth-bounds flag per pipeline. A coming build adds that field to the pipeline line. When it has run, I'll post the enable flag and the bounds pair for that pipeline here, so it can be set next to your 5070 Ti numbers and Slay326's 3070 result. The runs mentioned here were runs of the title on my PC with my own local copy of its data; only logged flags and values will be quoted. AI-assisted
r4tedx commented 2026-11-25 19:06:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T18:44:36Z.


Updated for the current main: head 1a45c5e3, two merge commits on b5c468f (main 67e8ae1, then 13f91ca), no force-push.

  • The host.rs conflict was main's new code next to the depth-bounds lines; both are kept. git diff 13f91ca 1a45c5e3 is the PR's own 7-file change. The only difference from before is that the README "GPU: world" row now starts from main's new wording.
  • victory-gpu library tests with --features diagnostics on WARP, at the first merge: 200 passed, 0 failed, 1 ignored (a release-only benchmark). Both depth-bounds tests pass. After the README-only second merge, cargo check -p victory-gpu --all-targets --features diagnostics is clean.

@Slay326 thank you for the RTX 3070 result: the head and ponytail coming back in that scene is the first in-title confirmation of this PR.

Synthetic tests only for this update; no title data used.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171332079 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7171332079). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T18:44:36Z. --- Updated for the current `main`: head **`1a45c5e3`**, two merge commits on `b5c468f` (main `67e8ae1`, then `13f91ca`), no force-push. - The `host.rs` conflict was main's new code next to the depth-bounds lines; both are kept. `git diff 13f91ca 1a45c5e3` is the PR's own 7-file change. The only difference from before is that the README "GPU: world" row now starts from main's new wording. - victory-gpu library tests with `--features diagnostics` on WARP, at the first merge: 200 passed, 0 failed, 1 ignored (a release-only benchmark). Both depth-bounds tests pass. After the README-only second merge, `cargo check -p victory-gpu --all-targets --features diagnostics` is clean. @Slay326 thank you for the RTX 3070 result: the head and ponytail coming back in that scene is the first in-title confirmation of this PR. Synthetic tests only for this update; no title data used. AI-assisted
r4tedx commented 2026-11-25 19:06:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T18:54:32Z.


@Venom2054 here is the comparison promised above. It agrees with your result.

Our run: RTX 5070, diagnostics build of a local play tree that carries an older head of this PR (49dd080) plus one logging commit that prints the depth-bounds state per pipeline.

  • The window/fence pipeline (the mesh and pixel pair named in the RTX 3070 report) is created with depth_bounds_test = false. The title does not ask for the test on it, so nothing is applied.
  • Bounds set on the lists: first (0.0, 1.0), then (4.8637e-5, 2.7794e-4), then (2.0462e-4, 2.7794e-4). Your max is the same, and your min of 4.72e-5 is close.

So on this pipeline this PR has nothing to switch on: the bounds reach the host, but the title draws the window/fence without the test. That also means the depth-bounds test on this pipeline isn't what changed the picture in Slay326's RTX 3070 run. Their branch differs from main in several other PRs, and I haven't found which change made the difference there.

This was a run of the title on my PC with my own local copy of its data. Only the logged flags and values are quoted here.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171566061 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7171566061). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T18:54:32Z. --- @Venom2054 here is the comparison promised above. It agrees with your result. Our run: RTX 5070, diagnostics build of a local play tree that carries an older head of this PR (`49dd080`) plus one logging commit that prints the depth-bounds state per pipeline. - **The window/fence pipeline** (the mesh and pixel pair named in the RTX 3070 report) is created with `depth_bounds_test = false`. The title does not ask for the test on it, so nothing is applied. - **Bounds set on the lists:** first `(0.0, 1.0)`, then `(4.8637e-5, 2.7794e-4)`, then `(2.0462e-4, 2.7794e-4)`. Your max is the same, and your min of 4.72e-5 is close. So on this pipeline this PR has nothing to switch on: the bounds reach the host, but the title draws the window/fence without the test. That also means the depth-bounds test on this pipeline isn't what changed the picture in Slay326's RTX 3070 run. Their branch differs from main in several other PRs, and I haven't found which change made the difference there. This was a run of the title on my PC with my own local copy of its data. Only the logged flags and values are quoted here. AI-assisted
andrewpozdnakov7-jpg commented 2026-11-25 21:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T20:45:31Z.


I reran the ClearState integration regression on this PR at 1a45c5e3, combined with the current-main ClearState follow-up based on #1166 at 2d779bf. WARP reported depth-bounds support. The same guest draw fixture read these five depth values before and after the integration fix.

Test build Fresh Excluded Included ClearState Reset
Composition 3d808f8 0.25 0.5 0.25 0.5 0.25
With bfa77cb 0.25 0.5 0.25 0.25 0.25

The next bind replayed the saved depth bounds after ClearState. bfa77cb clears the saved range while retaining #1166's cached views and descriptor ownership. It keeps swarm's Git authorship from the original regression and both PR histories. Six paired WARP runs reproduced the readback. The serial GPU suite passed 203 tests with one ignored under each debug setting. Strict Clippy in both configurations and asset policy passed.

Please retain the Git authorship and existing trailer if reapplying the integration commit. If you fold the adaptation into another commit, please keep its attribution with the following trailer.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

AI-assisted with Codex. Synthetic GPU commands on WARP.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7174147033 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7174147033). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T20:45:31Z. --- I reran the [ClearState integration regression](https://github.com/Marvisak/VIctory/issues/848#issuecomment-7132101488) on this PR at 1a45c5e3, combined with the [current-main ClearState follow-up](https://github.com/Marvisak/VIctory/pull/1166#issuecomment-7174017642) based on #1166 at 2d779bf. WARP reported depth-bounds support. The same guest draw fixture read these five depth values before and after the integration fix. | Test build | Fresh | Excluded | Included | ClearState | Reset | | --- | ---: | ---: | ---: | ---: | ---: | | Composition 3d808f8 | 0.25 | 0.5 | 0.25 | 0.5 | 0.25 | | With bfa77cb | 0.25 | 0.5 | 0.25 | 0.25 | 0.25 | The next bind replayed the saved depth bounds after ClearState. [bfa77cb](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/bfa77cbf5d1cb853e6cb9f65a989807e898c9bac) clears the saved range while retaining #1166's cached views and descriptor ownership. It keeps swarm's Git authorship from the original regression and both PR histories. Six paired WARP runs reproduced the readback. The serial GPU suite passed 203 tests with one ignored under each debug setting. Strict Clippy in both configurations and asset policy passed. Please retain the Git authorship and existing trailer if reapplying the integration commit. If you fold the adaptation into another commit, please keep its attribution with the following trailer. Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted with Codex. Synthetic GPU commands on WARP.
r4tedx commented 2026-11-25 21:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T20:46:38Z.


@andrewpozdnakov7-jpg thank you. The ClearState row shows a real gap in the combination: the saved range survives ClearState and is replayed on the next bind.

bfa77cb adds self.depth_bounds = None; to #1166's State::clear_state. Current main (13f91ca) has no ClearState yet, and nothing in this PR's draw.rs resets state there. So the change can't land on this PR alone: it needs whichever of #158 and #1166 merges second.

  • If #1166 merges first, I'll merge main into this branch (no force-push) and apply bfa77cb as it stands, with swarm's authorship and your Co-authored-by trailer, plus the five-value readback test.
  • If this PR merges first, the commit belongs on #1166 the same way.

I read the diff only and haven't run it. The table and the 203-test WARP suite are your results. No title data was involved.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7174172276 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7174172276). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T20:46:38Z. --- @andrewpozdnakov7-jpg thank you. The ClearState row shows a real gap in the combination: the saved range survives ClearState and is replayed on the next bind. `bfa77cb` adds `self.depth_bounds = None;` to #1166's `State::clear_state`. Current `main` (`13f91ca`) has no ClearState yet, and nothing in this PR's draw.rs resets state there. So the change can't land on this PR alone: it needs whichever of #158 and #1166 merges second. - If #1166 merges first, I'll merge `main` into this branch (no force-push) and apply `bfa77cb` as it stands, with swarm's authorship and your `Co-authored-by` trailer, plus the five-value readback test. - If this PR merges first, the commit belongs on #1166 the same way. I read the diff only and haven't run it. The table and the 203-test WARP suite are your results. No title data was involved. AI-assisted
upstream-sync closed this pull request 2026-11-25 23:02:21 +00:00
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
Marvisak/VIctory!158
No description provided.