Pass depth bounds through to D3D12 #35

Open
TokyoMkt wants to merge 2 commits from upstream-pr/35 into main
TokyoMkt commented 2026-11-25 05:09:07 +00:00 (Migrated from github.com)
First-time contributor

Imported from Zettrox/ztrx. Originally posted by TokyoMkt on 2026-11-25T04:24:09Z.


Ports Kaivyyy's fix from fxceless/victory-fork#82. Preserve the depth-bounds flag in host pipelines and replay the bounds when a command list is split.

112 GPU tests passed, including synthetic rendering and cache-key tests; 1 ignored. Workspace Clippy and asset policy passed. Not tested in-game.

<!-- greyfinch-sync:Zettrox/ztrx:issue:6597170791 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/pull/35). Originally posted by [TokyoMkt](https://github.com/TokyoMkt) on 2026-11-25T04:24:09Z. --- Ports Kaivyyy's fix from fxceless/victory-fork#82. Preserve the depth-bounds flag in host pipelines and replay the bounds when a command list is split. 112 GPU tests passed, including synthetic rendering and cache-key tests; 1 ignored. Workspace Clippy and asset policy passed. Not tested in-game.
ifBars commented 2026-11-25 06:06:46 +00:00 (Migrated from github.com)
Author
First-time contributor

Imported from Zettrox/ztrx. Originally posted by ifBars on 2026-11-25T05:57:44Z.


Tested locally on Windows 10 22H2 (19045), RTX 3060 Ti 8 GB, NVIDIA 610.88, 32 GB RAM, and Agility SDK 1.620.2.

With this PR at 813a413 included, the opening cutscene's audio, subtitles and title cards worked, but the 3D world stayed black at about 1 FPS. After leaving #35 out, we could see the world and characters in the opening in-engine cutscene. There is still missing geometry and broken rendering, and performance is around 1.0-1.2 FPS. Controllable gameplay hasn't been verified yet.

Both candidates use main at 90b529f plus #21, #27 and #36, the same local 1.0.2.1 game files and --console series-x. VICTORY_DISPLAY_MODE=1920x1080 was set, but the actual presentation surface was still 3840x2160 in both runs.

There are two confounders: the first run was a release build with a mostly cold world pipeline cache; the second was a diagnostics build using a copied, partially warmed cache. The shader source tree was identical between candidates. The black run still had roughly 1,091 pipelines pending near shutdown, so dropped first-use passes could also explain the difference. This needs a comparison with matched cache warmth and build features before attributing the black world to depth bounds.

The focused depth-bounds GPU readback and pipeline-cache reload tests did pass with Agility enabled. We're keeping #35 out of our local setup for now based on the visible result. Posting the reproduction here in case it helps narrow things down.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7154303653 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/pull/35#issuecomment-7154303653). Originally posted by [ifBars](https://github.com/ifBars) on 2026-11-25T05:57:44Z. --- Tested locally on Windows 10 22H2 (19045), RTX 3060 Ti 8 GB, NVIDIA 610.88, 32 GB RAM, and Agility SDK 1.620.2. With this PR at `813a413` included, the opening cutscene's audio, subtitles and title cards worked, but the 3D world stayed black at about 1 FPS. After leaving #35 out, we could see the world and characters in the opening in-engine cutscene. There is still missing geometry and broken rendering, and performance is around 1.0-1.2 FPS. Controllable gameplay hasn't been verified yet. Both candidates use `main` at `90b529f` plus #21, #27 and #36, the same local 1.0.2.1 game files and `--console series-x`. `VICTORY_DISPLAY_MODE=1920x1080` was set, but the actual presentation surface was still 3840x2160 in both runs. There are two confounders: the first run was a release build with a mostly cold world pipeline cache; the second was a diagnostics build using a copied, partially warmed cache. The shader source tree was identical between candidates. The black run still had roughly 1,091 pipelines pending near shutdown, so dropped first-use passes could also explain the difference. This needs a comparison with matched cache warmth and build features before attributing the black world to depth bounds. The focused depth-bounds GPU readback and pipeline-cache reload tests did pass with Agility enabled. We're keeping #35 out of our local setup for now based on the visible result. Posting the reproduction here in case it helps narrow things down.
futurepro62 commented 2026-11-25 07:06:30 +00:00 (Migrated from github.com)
Author
First-time contributor

Imported from Zettrox/ztrx. Originally posted by futurepro62 on 2026-11-25T06:38:47Z.


Full-suite run, to go with ifBars' RTX 3060 Ti run of the build above. Tested exact head 813a413 (on its base 90b529f).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (rust-toolchain.toml), DXC + dxil.dll 1.9.2602.17, debug.
  • cargo test --workspace --locked: 498 passed, 0 failed, 7 ignored (main 90b529f on this machine: 496 passed, 0 failed, 7 ignored).
  • cargo clippy --workspace --all-targets --locked -- -D warnings (the CI lint step): passed.
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (the CI lint step): passed.
  • The new tests ran and passed: only_enabled_depth_bounds_change_the_pipeline_key, depth_bounds_pipeline_loads_and_filters_draws.

Not tested

  • AMD (ztrx targets NVIDIA), a release build, the game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Zettrox/ztrx:comment:7155009391 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/pull/35#issuecomment-7155009391). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-25T06:38:47Z. --- Full-suite run, to go with ifBars' RTX 3060 Ti run of the build above. Tested exact head `813a413` (on its base `90b529f`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (`rust-toolchain.toml`), DXC + dxil.dll 1.9.2602.17, debug. - `cargo test --workspace --locked`: **498 passed, 0 failed, 7 ignored** (main `90b529f` on this machine: 496 passed, 0 failed, 7 ignored). - `cargo clippy --workspace --all-targets --locked -- -D warnings` (the CI lint step): passed. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (the CI lint step): passed. - The new tests ran and passed: `only_enabled_depth_bounds_change_the_pipeline_key`, `depth_bounds_pipeline_loads_and_filters_draws`. **Not tested** - AMD (ztrx targets NVIDIA), a release build, the game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Bullet18x commented 2026-11-25 09:08:57 +00:00 (Migrated from github.com)
Author
First-time contributor

Imported from Zettrox/ztrx. Originally posted by Bullet18x on 2026-11-25T08:23:40Z.


Tested on an RTX 5090 (driver 621.40), stacked with #68, #69, #36 and #33.

  • only_enabled_depth_bounds_change_the_pipeline_key and depth_bounds_pipeline_loads_and_filters_draws pass on the card.
  • In game, the a pipeline enables the depth bounds test, which its host pipeline leaves out warnings went from 4 → 0 over the same span.

Heads-up: this conflicts with #36 in mesh_pipeline (crates/victory-gpu/src/pipeline/host.rs). #36 changes the stream's blend to host_blend(&g.blend, &g.targets), and this PR restructures the stream into build plus a DEPTH_STENCIL1 branch. I resolved it by keeping this PR's structure, using host_blend(...) in both mesh streams, and keeping both PRs' tests. Everything above passes with that.

<!-- greyfinch-sync:Zettrox/ztrx:comment:7156970540 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/pull/35#issuecomment-7156970540). Originally posted by [Bullet18x](https://github.com/Bullet18x) on 2026-11-25T08:23:40Z. --- Tested on an RTX 5090 (driver 621.40), stacked with #68, #69, #36 and #33. - `only_enabled_depth_bounds_change_the_pipeline_key` and `depth_bounds_pipeline_loads_and_filters_draws` pass on the card. - In game, the `a pipeline enables the depth bounds test, which its host pipeline leaves out` warnings went from **4 → 0** over the same span. Heads-up: this conflicts with #36 in `mesh_pipeline` (`crates/victory-gpu/src/pipeline/host.rs`). #36 changes the stream's blend to `host_blend(&g.blend, &g.targets)`, and this PR restructures the stream into `build` plus a `DEPTH_STENCIL1` branch. I resolved it by keeping this PR's structure, using `host_blend(...)` in both mesh streams, and keeping both PRs' tests. Everything above passes with that.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/35:upstream-pr/35'
git switch 'upstream-pr/35'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/35'
git switch 'upstream-pr/35'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/35'
git switch 'upstream-pr/35'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/35'
git switch 'main'
git merge --squash 'upstream-pr/35'
git switch 'main'
git merge --ff-only 'upstream-pr/35'
git switch 'main'
git merge 'upstream-pr/35'
git push origin 'main'
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
Zettrox/ztrx!35
No description provided.