GPU: report unformatted buffer capabilities for DXGI_FORMAT_UNKNOWN #3771

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

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T17:45:17Z.


The guest FORMAT_SUPPORT query applies its default masks to format 0, DXGI_FORMAT_UNKNOWN. That advertises uses such as texture sampling and render targets for an unformatted buffer. Return BUFFER and TILED for this sentinel, matching the native D3D12 format query. D3D12 format support

The regression calls the guest device slot with the unknown format and with an RGBA8 render-target control. It checks both unknown-format masks and that the input format survives the call.

Query for format 0 Support1 Support2
Guest on main 63bcca4 0x7fffffff 0x0000ffff
Native WARP 1.0.22 0x00000001 0x00000200
Guest with this change 0x00000001 0x00000200

The comparison matched with the D3D12 debug layer off and on using Agility 1.620.2. The diagnostics GPU suite passed in both settings (247 passed, one ignored), both strict GPU Clippy configurations passed, and the asset policy passed.

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

<!-- greyfinch-sync:Marvisak/VIctory:issue:5542953670 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3771). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T17:45:17Z. --- The guest `FORMAT_SUPPORT` query applies its default masks to format 0, `DXGI_FORMAT_UNKNOWN`. That advertises uses such as texture sampling and render targets for an unformatted buffer. Return `BUFFER` and `TILED` for this sentinel, matching the native D3D12 format query. [D3D12 format support](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/hardware-support-for-direct3d-12-0-formats#dxgi_format_unknownl-0) The regression calls the guest device slot with the unknown format and with an RGBA8 render-target control. It checks both unknown-format masks and that the input format survives the call. | Query for format 0 | Support1 | Support2 | | --- | --- | --- | | Guest on main `63bcca4` | `0x7fffffff` | `0x0000ffff` | | Native WARP 1.0.22 | `0x00000001` | `0x00000200` | | Guest with this change | `0x00000001` | `0x00000200` | The comparison matched with the D3D12 debug layer off and on using Agility 1.620.2. The diagnostics GPU suite passed in both settings (247 passed, one ignored), both strict GPU Clippy configurations passed, and the asset policy passed. Please retain the Git author on cherry-pick or rebase. If folding the change into another commit, add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted with OpenAI Codex. Synthetic checks only.
andrewpozdnakov7-jpg commented 2026-11-28 17:48:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T17:48:41Z.


Windows CI passed on b85a1f6, including the workspace tests and both Clippy configurations.

With WARP 1.0.22 and Agility 1.620.2, the guest masks for DXGI_FORMAT_UNKNOWN changed from 0x7fffffff / 0x0000ffff to 0x00000001 / 0x00000200, matching the direct D3D12 query in both D3D12 debug-layer settings. Each local diagnostics suite had 247 passes and one ignored test.

I also checked this branch with #3490 at 7c932d0, #3752 at b1c820b, and #3758 at 37edd30. The local integration keeps the unknown-format branch before the typed-format masks and retains all four regressions. After resolving the overlapping device.rs edits, all 12 device tests passed in both debug settings.

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:comment:7243304952 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3771#issuecomment-7243304952). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T17:48:41Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46172163570/job/141062781092) passed on `b85a1f6`, including the workspace tests and both Clippy configurations. With WARP 1.0.22 and Agility 1.620.2, the guest masks for `DXGI_FORMAT_UNKNOWN` changed from `0x7fffffff / 0x0000ffff` to `0x00000001 / 0x00000200`, matching the direct D3D12 query in both D3D12 debug-layer settings. Each local diagnostics suite had 247 passes and one ignored test. I also checked this branch with #3490 at `7c932d0`, #3752 at `b1c820b`, and #3758 at `37edd30`. The local integration keeps the unknown-format branch before the typed-format masks and retains all four regressions. After resolving the overlapping `device.rs` edits, all 12 device tests passed in both debug settings. 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.
cloph-dsp commented 2026-11-30 11:14:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-30T11:14:24Z.


Independent verification (AI-assisted: Hy4 flash), Windows / Rust 1.100.0 / MSVC, cargo test --locked.

  • Worktree D:\Victory-Contrib\pr-3771-watch, dedicated CARGO_TARGET_DIR=D:\Victory-Contrib\target-3771 (never shared).
  • Negative control: git grep -F unknown_format_reports_buffer_and_tiled_support 63bcca43c6a00a758510398fa43096ce7e4f7df0 -- crates/victory-gpu/src/device.rs → exit 1 (test is new on base).
  • git diff --check 63bcca43..HEAD → exit 0 (clean).
  • cargo test --locked -p victory-gpu --lib -- device::tests::unknown_format_reports_buffer_and_tiled_support --exact --test-threads=1 --quiet → 1 passed; 0 failed; 232 filtered out, exit 0.

No specific GPU/driver required: the synthetic device and the format-support check are CPU-only. No game data, assets, extracted shaders, DRM or decrypt used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7276744032 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3771#issuecomment-7276744032). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-30T11:14:24Z. --- Independent verification (AI-assisted: Hy4 flash), Windows / Rust 1.100.0 / MSVC, `cargo test --locked`. - Worktree `D:\Victory-Contrib\pr-3771-watch`, dedicated `CARGO_TARGET_DIR=D:\Victory-Contrib\target-3771` (never shared). - Negative control: `git grep -F unknown_format_reports_buffer_and_tiled_support 63bcca43c6a00a758510398fa43096ce7e4f7df0 -- crates/victory-gpu/src/device.rs` → exit 1 (test is new on base). - `git diff --check 63bcca43..HEAD` → exit 0 (clean). - `cargo test --locked -p victory-gpu --lib -- device::tests::unknown_format_reports_buffer_and_tiled_support --exact --test-threads=1 --quiet` → `1 passed; 0 failed; 232 filtered out`, exit 0. No specific GPU/driver required: the synthetic device and the format-support check are CPU-only. No game data, assets, extracted shaders, DRM or decrypt used.
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/3771:upstream-pr/3771'
git switch 'upstream-pr/3771'

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