GPU: stop advertising BC textures as render targets #3490
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3490"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T09:08:34Z.
Refs #718.
The title-facing
FORMAT_SUPPORTquery advertises render-target use for BC textures. D3D12 disallows those render-target uses for the standard BC formats. The query now uses VIctory's existing block-size table to clearRENDER_TARGET,BLENDABLEandMULTISAMPLE_RENDERTARGETfor BC1–BC7. The response stays independent of the host adapter. D3D12 format supportThe regression calls the device method for all 21 standard BC variants, checks ordinary texture support, and includes RGBA8, a BGR format and two console-specific color formats as controls. It fails on
63bcca4and passes with the fix. A separate native D3D12 query on Microsoft WARP agreed on the three render-target flags for all 21 BC variants and the RGBA8 control.Windows diagnostics GPU suite: 244 passed, 3 failed and 1 ignored with the fix. Main had 243 passed, the same three failures and one ignored on the same WARP runtime. Strict GPU Clippy passed with default and all features. Asset policy and git diff checks passed.
Thanks to @fuzeofficlal for the original BC1 report and the adapter comparisons. Validation covers synthetic Windows capability queries on the WARP software adapter. A title-side observation is still needed to establish which flags affect its rendering path. AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by AurumCarlos on 2026-11-27T09:23:49Z.
Review: COMMENTED
This has the same evidence gap that closed #1369. Its triage asked for what the console reports, or what the title does with the answer (the call sites and which bits it tests), and said a comparison with the host's native query doesn't settle it; fuzeofficlal closed it for lacking that title evidence. The WARP comparison here is the same kind of evidence. If a title is seen querying a BC format and branching on
RENDER_TARGET, quoting that call would address it.device.rs:315). If the goal is to stop advertising uses D3D12 can't create for BC, BC formats still reportTEXTURE1D(0x10),DEPTH_STENCIL(0x10000) andTYPED_UNORDERED_ACCESS_VIEW(0x2000000), and all ofSupport2's typed UAV load/store/atomic bits (0xffff). Either clear those too or say why only the output-merger bits matter.shortcut:note is removed, but every non-BC format still gets the fixed all-uses masks. Keeping it leaves the remaining shortcut findable.Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T09:36:10Z.
Independent CPU-only verification of PR #3490 (head
2a1a858, merge base63bcca4).$env:CARGO_TARGET_DIR='D:\Victory-Contrib\target-3490-verify'; $env:CARGO_BUILD_JOBS='2'; cargo test --locked -p victory-gpu --lib -- device::tests::block_compressed_formats_are_not_render_targets --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 232 filtered, exit 0.git grep -F block_compressed_formats_are_not_render_targets 63bcca4 -- crates/victory-gpu/src/device.rs→ no hit (the test is new).git diff --check 63bcca4 HEAD→ clean.fetch_updatedeprecation warnings.This confirms the targeted synthetic test passes on Windows/Rust 1.100.0/MSVC. It does not settle the substantive points in AurumCarlos's review (title evidence for the queried bits and the remaining BC capability bits); those still need the author/maintainer.
AI-assisted (Hy4 flash). GPU/driver: N/A for this CPU test. No game data.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T09:52:10Z.
Thanks, AurumCarlos.
7c932d0restores the shortcut comment for the fixed capability masks. The focused device test still passes.The scope is the render-target, blend and multisample-render-target flags for standard BC formats. A broader capability profile needs console evidence for those other uses. I clarified the PR description so the synthetic query comparison and the title-side question are both visible. A verified BC-format query followed by a branch on one of these flags would establish the effect in a title.
AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-27T19:05:21Z.
NVIDIA full-suite run, to go with the reports above by cloph-dsp, since none of them names a GPU run. Tested exact head
7c932d0(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo 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.block_compressed_formats_are_not_render_targets.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#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_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.