GPU: a render or depth view description with an unknown format names the resource's on a typeless host copy #2279

Open
github-bot wants to merge 1 commit from github-bot/gh-2279 into main AGit
Owner

@⁠denkencar-sketch on GitHub · 2026-11-25 09:29 UTC · original
denkencar-sketch:fix/desc-002 → main · +36 −12 · 1 files · 1 commits · open

Summary

A render or depth view description with an unknown format was passed to a typeless host copy with that format, which the host refuses. Only descriptionless views were given the format; a described view with an unknown format now takes the resource's.

Testing

Test an_unknown_format_in_a_view_description_is_the_resources fails without the substitution and passes with this change. cargo test --workspace --locked passes apart from the known flakes: modules::dstorage::tests::a_page_list_filled_after_its_request_starts fails now and then on main too, and so does a parallel-run flake in victory-gpu's lib tests (watch:: and descriptor::host:: tests, 2 of 40 runs on pristine main).

Not tried: a real typeless depth view, and a run in the game.

AI-assisted.

**@⁠denkencar-sketch** on GitHub · 2026-11-25 09:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/2279) `denkencar-sketch:fix/desc-002` → `main` · +36 −12 · 1 files · 1 commits · open ## Summary A render or depth view description with an unknown format was passed to a typeless host copy with that format, which the host refuses. Only descriptionless views were given the format; a described view with an unknown format now takes the resource's. ## Testing Test `an_unknown_format_in_a_view_description_is_the_resources` fails without the substitution and passes with this change. `cargo test --workspace --locked` passes apart from the known flakes: `modules::dstorage::tests::a_page_list_filled_after_its_request_starts` fails now and then on `main` too, and so does a parallel-run flake in `victory-gpu`'s lib tests (`watch::` and `descriptor::host::` tests, 2 of 40 runs on pristine `main`). Not tried: a real typeless depth view, and a run in the game. AI-assisted.
Only descriptionless views were given the title's format; the host refuses
the unknown format of a described one.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:00:48 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-25 09:37 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-25 09:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2279#issuecomment-7158581831) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 10:14 UTC · original · edited 2026-11-25 10:22 UTC

I tested the real typeless-depth case called out in the PR. 9b1a21f adds one test directly on 132472838c090346c18b3af5dd1df4c04ba33689.

A guest D32_FLOAT resource creates an R32_TYPELESS host texture. With the main descriptor code from 940d32f69b, the same test receives DXGI_FORMAT_UNKNOWN from the view decoder and stops before creating the DSV. On this PR it receives D32_FLOAT, records a host clear and reads back 0.375 from all 16 depth values on WARP. The full GPU suite on WARP passed with 148 passed and 2 ignored. Strict Clippy in both modes and the repository policy check passed.

Please preserve the test's Git author if you take it. If you fold it into another commit, please add:

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

AI-assisted. Synthetic tests only.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 10:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/2279#issuecomment-7159427960) · edited 2026-11-25 10:22 UTC I tested the real typeless-depth case called out in the PR. [9b1a21f](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/9b1a21f72c67585131877bfce84ddc1cdc5a0006) adds one test directly on 132472838c090346c18b3af5dd1df4c04ba33689. A guest D32_FLOAT resource creates an R32_TYPELESS host texture. With the main descriptor code from 940d32f69b22265690a0b5a15d6ded572ba33baf, the same test receives DXGI_FORMAT_UNKNOWN from the view decoder and stops before creating the DSV. On this PR it receives D32_FLOAT, records a host clear and reads back 0.375 from all 16 depth values on WARP. The full GPU suite on WARP passed with 148 passed and 2 ignored. Strict Clippy in both modes and the repository policy check passed. Please preserve the test's Git author if you take it. If you fold it into another commit, please add: Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted. Synthetic tests only.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 13:32 UTC · original · edited 2026-11-26 01:22 UTC

Automated triage for the maintainers.

Merge candidate. Rebased; it merges cleanly again. In crates/victory-gpu/src/descriptor.rs, RtvRecord::host_desc now goes through host_words: a view that has a description but names the unknown format (0) gets the format from resource::view_format, just as a view without a description already did. A typeless host copy cannot take an RTV/DSV with an unknown format. Views with a typed host copy, and views that name a format, are unchanged. The new test an_unknown_format_in_a_view_description_is_the_resources covers those cases and the pc_format mapping (118 -> 20).

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 13:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/2279#issuecomment-7163930961) · edited 2026-11-26 01:22 UTC <!-- victory-triage v1 head=bda54f776620b7bcbdaf04efaafcba9b9ad20110 verdict=merge-candidate at=2026-11-26T01:22:31Z --> Automated triage for the maintainers. **Merge candidate.** Rebased; it merges cleanly again. In `crates/victory-gpu/src/descriptor.rs`, `RtvRecord::host_desc` now goes through `host_words`: a view that has a description but names the unknown format (0) gets the format from `resource::view_format`, just as a view without a description already did. A typeless host copy cannot take an RTV/DSV with an unknown format. Views with a typed host copy, and views that name a format, are unchanged. The new test `an_unknown_format_in_a_view_description_is_the_resources` covers those cases and the `pc_format` mapping (118 -> 20). CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2279/head:github-bot/gh-2279'
git switch 'github-bot/gh-2279'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2279'
git switch 'github-bot/gh-2279'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2279'
git switch 'github-bot/gh-2279'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2279'
git switch 'main'
git merge --squash 'github-bot/gh-2279'
git switch 'main'
git merge --ff-only 'github-bot/gh-2279'
git switch 'main'
git merge 'github-bot/gh-2279'
git push origin 'main'
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!2279
No description provided.