GPU: report typed depth formats without color target support #3752

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3752 into main
andrewpozdnakov7-jpg commented 2026-11-28 15:05:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T15:05:46Z.


The FORMAT_SUPPORT reply on main sets RENDER_TARGET and BLENDABLE for D32_FLOAT_S8X24_UINT, D32_FLOAT, D24_UNORM_S8_UINT, and D16_UNORM. These are typed depth/stencil formats. Clear the two color flags for those four formats and keep the depth/stencil bit. Direct3D 12 format support tables.

On app-local WARP 1.0.22 with Agility 1.620.2, I compared the selected guest flags with direct D3D12_FEATURE_FORMAT_SUPPORT queries. Main 63bcca4 disagreed on all four depth/stencil formats. The patched reply matched on all four, and RGBA8, R32_FLOAT, and R16_UNORM matched both before and after. The same seven cases ran with the D3D12 debug layer off and on.

The checked-in regression exercises the device vtable and checks that each input format is retained. This is a focused companion to the BC-format change in #3490 and the report in #718.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this into another commit. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5541495536 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3752). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T15:05:46Z. --- The `FORMAT_SUPPORT` reply on main sets `RENDER_TARGET` and `BLENDABLE` for `D32_FLOAT_S8X24_UINT`, `D32_FLOAT`, `D24_UNORM_S8_UINT`, and `D16_UNORM`. These are typed depth/stencil formats. Clear the two color flags for those four formats and keep the depth/stencil bit. [Direct3D 12 format support tables](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/hardware-support-for-direct3d-12-1-formats). On app-local WARP 1.0.22 with Agility 1.620.2, I compared the selected guest flags with direct `D3D12_FEATURE_FORMAT_SUPPORT` queries. Main `63bcca4` disagreed on all four depth/stencil formats. The patched reply matched on all four, and RGBA8, R32_FLOAT, and R16_UNORM matched both before and after. The same seven cases ran with the D3D12 debug layer off and on. The checked-in regression exercises the device vtable and checks that each input format is retained. This is a focused companion to the BC-format change in #3490 and the report in #718. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 15:08:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T15:08:37Z.


Windows CI passed on the exact b1c820b head, including workspace tests and both Clippy configurations.

The synthetic flag comparison matched direct WARP results for all four depth/stencil formats and all three color controls. The full local GPU diagnostics suite had 247 passes and one ignored with the D3D12 debug layer off and on. I also merged this head locally with #3490 at 7c932d0. All ten device tests passed, including both format-support regressions.

Please retain the Git author if carrying the fix separately. If folding it into another commit, please add Co-authored-by: andrewpozdnakov7-jpg [email protected]. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241234946 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3752#issuecomment-7241234946). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T15:08:37Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46158040048/job/141018910175) passed on the exact b1c820b head, including workspace tests and both Clippy configurations. The synthetic flag comparison matched direct WARP results for all four depth/stencil formats and all three color controls. The full local GPU diagnostics suite had 247 passes and one ignored with the D3D12 debug layer off and on. I also merged this head locally with #3490 at 7c932d0. All ten device tests passed, including both format-support regressions. Please retain the Git author if carrying the fix separately. If folding it into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>. AI-assisted with OpenAI Codex.
cloph-dsp commented 2026-11-28 15:20:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-28T15:20:31Z.


Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):

  • PR #3752 at head b1c820b49a22ca322de08e941910393276f46ec6, base/parent 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • cargo test --locked -p victory-gpu --lib -- device::tests::typed_depth_formats_do_not_advertise_color_target_support --exact --test-threads=1 --quiet → 1 passed, 0 failed, 232 filtered, exit 0.
  • git grep -F for the test name on the base returned no match (test is new on this PR); git diff --check 63bcca4 HEAD clean (1 file, +29).
  • Used a per-worktree CARGO_TARGET_DIR (never shared) with CARGO_BUILD_JOBS=2.
  • Only the named synthetic test was replayed; full workspace suite and clippy were not run locally.
  • GPU/driver: N/A (CPU-only format-flag test). No game data, assets, extracted shaders, DRM or decrypt involved.

AI-assisted (Hy4 flash).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241392169 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3752#issuecomment-7241392169). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-28T15:20:31Z. --- Independent local verification (Windows, Rust 1.100.0/MSVC, no game data): - PR #3752 at head `b1c820b49a22ca322de08e941910393276f46ec6`, base/parent `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - `cargo test --locked -p victory-gpu --lib -- device::tests::typed_depth_formats_do_not_advertise_color_target_support --exact --test-threads=1 --quiet` → 1 passed, 0 failed, 232 filtered, exit 0. - `git grep -F` for the test name on the base returned no match (test is new on this PR); `git diff --check 63bcca4 HEAD` clean (1 file, +29). - Used a per-worktree `CARGO_TARGET_DIR` (never shared) with `CARGO_BUILD_JOBS=2`. - Only the named synthetic test was replayed; full workspace suite and clippy were not run locally. - GPU/driver: N/A (CPU-only format-flag test). No game data, assets, extracted shaders, DRM or decrypt involved. AI-assisted (Hy4 flash).
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/3752:upstream-pr/3752'
git switch 'upstream-pr/3752'

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/3752'
git switch 'upstream-pr/3752'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3752'
git switch 'upstream-pr/3752'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3752'
git switch 'main'
git merge --squash 'upstream-pr/3752'
git switch 'main'
git merge --ff-only 'upstream-pr/3752'
git switch 'main'
git merge 'upstream-pr/3752'
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
Marvisak/VIctory!3752
No description provided.