GPU: report single-sample quality for BC formats #3517

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

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T12:25:45Z.


Change

The MULTISAMPLE_QUALITY_LEVELS query in #718 can return one level for BC1 through BC7 at 2, 4 or 8 samples. Use the existing format table to return zero for those three counts on standard BC formats. A BC query at one sample returns one level. The answer is adapter independent. D3D12 format support tables

Verification

  • On 63bcca4, the new guest device regression fails with BC1_TYPELESS at two samples, which reports one quality level. At 2356e25, all 308 guest cases pass, including the RGBA8 controls, two flag values and checks that the inputs are preserved.
  • Direct D3D12 queries on app-local WARP 1.0.22 and Agility 1.620.2 return one level for all 21 one-sample BC queries and zero for all 63 higher-count BC queries. RGBA8 returns one level at each sampled count of 1, 2, 4 and 8.
  • All ten device tests in the diagnostic build pass, including the private WARP comparison. Strict Clippy passes with default and all features. The asset policy check passes.
  • Both guest regressions pass together on the clean combination 50a6dd7 based on #3490 head 7c932d0. That PR covers the separate format-support flags.

These are synthetic API checks. Confirmation of this query at a game call site is still open.

Refs #718. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5526593095 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3517). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T12:25:45Z. --- ## Change The `MULTISAMPLE_QUALITY_LEVELS` query in #718 can return one level for BC1 through BC7 at 2, 4 or 8 samples. Use the existing format table to return zero for those three counts on standard BC formats. A BC query at one sample returns one level. The answer is adapter independent. [D3D12 format support tables](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/hardware-support-for-direct3d-12-0-formats) ## Verification - On `63bcca4`, the new guest device regression fails with `BC1_TYPELESS` at two samples, which reports one quality level. At `2356e25`, all 308 guest cases pass, including the RGBA8 controls, two flag values and checks that the inputs are preserved. - Direct D3D12 queries on app-local WARP 1.0.22 and Agility 1.620.2 return one level for all 21 one-sample BC queries and zero for all 63 higher-count BC queries. RGBA8 returns one level at each sampled count of 1, 2, 4 and 8. - All ten device tests in the diagnostic build pass, including the private WARP comparison. Strict Clippy passes with default and all features. The asset policy check passes. - Both guest regressions pass together on the clean combination `50a6dd7` based on #3490 head `7c932d0`. That PR covers the separate format-support flags. These are synthetic API checks. Confirmation of this query at a game call site is still open. Refs #718. AI-assisted with OpenAI Codex.
cloph-dsp commented 2026-11-27 13:00:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T13:00:44Z.


Independent CPU-only verification of PR #3517 (GPU: report single-sample quality for BC formats).

  • Head: 2356e25e3ac8f43653b59234b6a935d4c3964842; merge base: 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • Windows, Rust 1.100.0/MSVC, CARGO_BUILD_JOBS=2, per-worktree CARGO_TARGET_DIR=D:\Victory-Contrib\target-3517-watch.
  • Negative control: git grep -F -c block_compressed_formats_only_report_single_sample_quality 63bcca43 -- crates/victory-gpu/src/device.rs → 0 hits (exit 1); the test is genuinely new.
  • cargo test --locked -p victory-gpu --lib -- device::tests::block_compressed_formats_only_report_single_sample_quality --exact --test-threads=1 --quiet → 1 passed, 0 failed, 232 filtered, exit 0.
  • git diff --check 63bcca43 HEAD → exit 0 (clean).

Only the synthetic fake-vtable CheckFeatureSupport test was replayed; no real D3D12 adapter path was exercised. Full crate suite not run.

AI-assisted (Hy4 flash). GPU/driver: N/A for this CPU-only synthetic test. No game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7218948288 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3517#issuecomment-7218948288). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T13:00:44Z. --- Independent CPU-only verification of PR #3517 (`GPU: report single-sample quality for BC formats`). - Head: `2356e25e3ac8f43653b59234b6a935d4c3964842`; merge base: `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - Windows, Rust 1.100.0/MSVC, `CARGO_BUILD_JOBS=2`, per-worktree `CARGO_TARGET_DIR=D:\Victory-Contrib\target-3517-watch`. - Negative control: `git grep -F -c block_compressed_formats_only_report_single_sample_quality 63bcca43 -- crates/victory-gpu/src/device.rs` → 0 hits (exit 1); the test is genuinely new. - `cargo test --locked -p victory-gpu --lib -- device::tests::block_compressed_formats_only_report_single_sample_quality --exact --test-threads=1 --quiet` → 1 passed, 0 failed, 232 filtered, exit 0. - `git diff --check 63bcca43 HEAD` → exit 0 (clean). Only the synthetic fake-vtable `CheckFeatureSupport` test was replayed; no real D3D12 adapter path was exercised. Full crate suite not run. AI-assisted (Hy4 flash). GPU/driver: N/A for this CPU-only synthetic test. No game data.
futurepro62 commented 2026-11-27 19:33:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-27T19:33:14Z.


NVIDIA full-suite run, to go with the reports above by cloph-dsp, since none of them names a GPU run. Tested exact head 2356e25 (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 867 passed, 0 failed, 10 ignored.
  • The new tests ran and passed: block_compressed_formats_only_report_single_sample_quality.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (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:Marvisak/VIctory:comment:7226641013 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3517#issuecomment-7226641013). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T19:33:14Z. --- NVIDIA full-suite run, to go with the reports above by cloph-dsp, since none of them names a GPU run. Tested exact head `2356e25` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **867 passed, 0 failed, 10 ignored**. - The new tests ran and passed: `block_compressed_formats_only_report_single_sample_quality`. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
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/3517:upstream-pr/3517'
git switch 'upstream-pr/3517'

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