GPU: report integer color formats without blend support #3758

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

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T16:04:01Z.


The guest FORMAT_SUPPORT query advertises BLENDABLE for typed integer color formats. Host PSO creation already disables blending for those formats. This makes the feature query use the same classification as descriptor signedness and PSO setup. Direct3D 12 format support tables

I compared the guest blend flag with direct D3D12 queries on app-local WARP 1.0.22 and Agility 1.620.2. Main 63bcca4 disagreed for all 21 typed integer color formats. The patch matched all 27 queries, including six UNORM, sRGB and floating-point controls. The same results held with the D3D12 debug layer off and on.

The vtable regression checks each integer format and verifies the render-target bit for R32_UINT. This follows the integer-target PSO handling discussed in #2775.

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

<!-- greyfinch-sync:Marvisak/VIctory:issue:5542055898 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3758). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T16:04:01Z. --- The guest `FORMAT_SUPPORT` query advertises `BLENDABLE` for typed integer color formats. Host PSO creation already disables blending for those formats. This makes the feature query use the same classification as descriptor signedness and PSO setup. [Direct3D 12 format support tables](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/hardware-support-for-direct3d-12-1-formats#dxgi_format_r8g8b8a8_uintfcs-30) I compared the guest blend flag with direct D3D12 queries on app-local WARP 1.0.22 and Agility 1.620.2. Main `63bcca4` disagreed for all 21 typed integer color formats. The patch matched all 27 queries, including six UNORM, sRGB and floating-point controls. The same results held with the D3D12 debug layer off and on. The vtable regression checks each integer format and verifies the render-target bit for R32_UINT. This follows the integer-target PSO handling discussed in #2775. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 16:07:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T16:07:26Z.


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

In the same guest/host comparison, the blend flag matched WARP for 6/27 formats on main and 27/27 with this fix. On WARP 1.0.22 with Agility 1.620.2, the GPU diagnostics suite reported 247 passes and one ignored test with the D3D12 debug layer off and again with it on.

I also tested this change locally with #3490 at 7c932d0 and #3752 at b1c820b. The changes overlap in the format query and its tests. Keeping all three flag checks yielded 11/11 device tests and 4/4 host pipeline tests passing.

Please retain the Git author if carrying this 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:7241991425 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3758#issuecomment-7241991425). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T16:07:26Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46163148372/job/141034730754) passed on `37edd30`, including the workspace tests and both Clippy configurations. In the same guest/host comparison, the blend flag matched WARP for 6/27 formats on main and 27/27 with this fix. On WARP 1.0.22 with Agility 1.620.2, the GPU diagnostics suite reported 247 passes and one ignored test with the D3D12 debug layer off and again with it on. I also tested this change locally with #3490 at `7c932d0` and #3752 at `b1c820b`. The changes overlap in the format query and its tests. Keeping all three flag checks yielded 11/11 device tests and 4/4 host pipeline tests passing. Please retain the Git author if carrying this 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 16:21:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-28T16:21:03Z.


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

  • PR #3758 at head 37edd30c4737722b1e87a0d5cb5385332e19bec5, base/parent 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • cargo test --locked -p victory-gpu --lib -- device::tests::integer_color_formats_do_not_advertise_blending --exact --test-threads=1 --quiet → 1 passed, 0 failed, 232 filtered, exit 0 (2 pre-existing warnings in the lib test build).
  • git grep -F for the test name on the parent returned no match (test is new on this PR); git diff --check 63bcca4 HEAD clean (4 files, +45/-42 — small refactor of the integer-format helper into resource.rs).
  • 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 device-slot test; no D3D12 device or title data involved). No game data, assets, extracted shaders, DRM or decrypt involved.

AI-assisted (Hy4 flash).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7242174376 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3758#issuecomment-7242174376). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-28T16:21:03Z. --- Independent local verification (Windows, Rust 1.100.0/MSVC, no game data): - PR #3758 at head `37edd30c4737722b1e87a0d5cb5385332e19bec5`, base/parent `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - `cargo test --locked -p victory-gpu --lib -- device::tests::integer_color_formats_do_not_advertise_blending --exact --test-threads=1 --quiet` → 1 passed, 0 failed, 232 filtered, exit 0 (2 pre-existing warnings in the lib test build). - `git grep -F` for the test name on the parent returned no match (test is new on this PR); `git diff --check 63bcca4 HEAD` clean (4 files, +45/-42 — small refactor of the integer-format helper into `resource.rs`). - 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 device-slot test; no D3D12 device or title data involved). 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/3758:upstream-pr/3758'
git switch 'upstream-pr/3758'

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