GPU: the depth bounds test reaches the host #158

Manually merged
github merged 4 commits from gh-pr/158/head into gh-pr/158/base 2026-11-26 03:52:37 +00:00
Owner

@⁠r4tedx on GitHub · 2026-11-24 01:01 UTC · original
r4tedx:gpu/depth-bounds → main · +444 −33 · 7 files · 4 commits · merged 2026-11-25 22:48 UTC

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

**@⁠r4tedx** on GitHub · 2026-11-24 01:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/158) `r4tedx:gpu/depth-bounds` → `main` · +444 −33 · 7 files · 4 commits · merged 2026-11-25 22:48 UTC **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)
Keep the kind-21 enable flag in the graphics state and pipeline cache
key. Use DEPTH_STENCIL1 for vertex and mesh streams that request the
test when the host supports it. Unsupported hosts fall back to the
plain depth-stencil state and warn once.

Forward the title's depth bounds to the host command list and replay
them when binding a graphics pipeline, including after the indirect
clamp. New and reset lists start with D3D12's 0..1 default.

Synthetic title draws and mesh dispatches on an RTX 5070 and WARP
kept excluded pixels at the cleared depth of 0.5 and wrote 0.25 to
included pixels. Fresh and reset lists also wrote 0.25. A forced
unsupported run drew all pixels, and the stream reader regression
failed with the upstream reader. Since the rebase onto 940d32f the
vertex stream also carries the rectangle lists' geometry shader and
both streams the topology type; only the draw ran again, on WARP.
The console subobject layout and call signature still need title-side
verification.
The triage on #158 asks for a maintainer's sign-off on new code that
starts an external process; the only such code was the mesh-dispatch
test, which ran dxc from VICTORY_PC_DXC and was skipped without it.
The stream-level test and the vertex draw test stay; the mesh path of
the shared stream builder is no longer exercised on a GPU here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	crates/victory-gpu/src/host.rs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:36 +00:00
github manually merged commit 1a45c5e3fc into gh-pr/158/base 2026-11-26 03:52:37 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:41 UTC · original

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.

**@⁠jeremygold02** on GitHub · 2026-11-24 04:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7122250382) 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.
Author
Owner

@⁠DeerSilver on GitHub · 2026-11-24 10:51 UTC · original

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).

**@⁠DeerSilver** on GitHub · 2026-11-24 10:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7129331598) 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).
Author
Owner

@⁠465d6a0eac on GitHub · 2026-11-24 16:28 UTC · original · edited 2026-11-24 17:20 UTC

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.
**@⁠465d6a0eac** on GitHub · 2026-11-24 16:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7137734765) · edited 2026-11-24 17:20 UTC 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:18 UTC · original · edited 2026-11-25 19:19 UTC

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

**@⁠Marvisak** on GitHub · 2026-11-25 00:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7148371712) · edited 2026-11-25 19:19 UTC <!-- 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)_
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 04:33 UTC · original

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** on GitHub · 2026-11-25 04:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7152957359) 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.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 06:24 UTC · original

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** on GitHub · 2026-11-25 06:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7154756457) 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.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 07:06 UTC · original

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.

**@⁠r4tedx** on GitHub · 2026-11-25 07:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7155498840) 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.
Author
Owner

@⁠Slay326 on GitHub · 2026-11-25 16:25 UTC · original

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.

**@⁠Slay326** on GitHub · 2026-11-25 16:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7167955140) 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.
Author
Owner

@⁠Venom2054 on GitHub · 2026-11-25 16:46 UTC · original

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.

**@⁠Venom2054** on GitHub · 2026-11-25 16:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7168520293) 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.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 16:49 UTC · original

@⁠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** on GitHub · 2026-11-25 16:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7168597442) @⁠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
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 18:44 UTC · original

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** on GitHub · 2026-11-25 18:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7171332079) 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
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 18:54 UTC · original

@⁠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

**@⁠r4tedx** on GitHub · 2026-11-25 18:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7171566061) @⁠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
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 20:45 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 20:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7174147033) I reran the [ClearState integration regression](https://git.gtahub.st/github/Marvisak--VIctory/issues/848) on this PR at 1a45c5e3, combined with the [current-main ClearState follow-up](https://git.gtahub.st/github/Marvisak--VIctory/pulls/1166) 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.
Author
Owner

@⁠r4tedx on GitHub · 2026-11-25 20:46 UTC · original

@⁠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

**@⁠r4tedx** on GitHub · 2026-11-25 20:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/158#issuecomment-7174172276) @⁠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
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!158
No description provided.