Format support query advertises BC1 as a render target #718
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 fuzeofficlal on 2026-11-24T08:01:04Z.
On
787f665, the guestCheckFeatureSupport(FORMAT_SUPPORT)returns the same all-capabilities masks for every format. The query reportsRENDER_TARGETforDXGI_FORMAT_BC1_UNORM, while a direct native D3D12 query on the selected adapter clears that bit. This reproduces on RTX 5090 and WARP.Reproduction
Query
FORMAT_SUPPORTthrough the guest device for BC1 and RGBA8. Compare both returned support words with a native query on the same adapter. RGBA8 is the positive render-target control. The guest and native BC1 answers disagree on both adapters.Source fix
Commit
7007f33uses the existing guest-to-PC format mapping and the selected native device. It reports zero support for five guest formats with no host mapping, including 189–191 whose numeric IDs describe different native PC formats.The synthetic check passes ten format cases on each adapter, including positive RGBA8, BC1, the three mapped depth formats and the five unmapped formats. It also checks that the input format ID is preserved and malformed queries still reject. The GPU diagnostics suite passes 45 tests with one benchmark ignored on each backend.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T08:15:31Z.
I checked the related
MULTISAMPLE_QUALITY_LEVELSquery at2745589. On both RTX 5090 and WARP, the guest reported one quality level for BC1 at 4× and for tiled RGBA8 at 8×, while native D3D12 reported zero. Non-tiled RGBA8 at 8× still reported one. An ordinary 4× RGBA8 clear and resolve read back 16/16 expected pixels on each adapter.Follow-up commit
29a7e94forwards the mapped format, sample count and flags to D3D12 within the guest texture layout's existing 8× ceiling. Both adapters passed all 15 synthetic query cases and 50 diagnostics tests, with one benchmark ignored.Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T08:34:32Z.
Verified on Windows 11 MSVC (Rust 1.98.1):
Querying native format support via
host.device.CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)with mappedresource::pc_formatcorrectly reports hardware capabilities and zeroes unmapped formats (116, 117, 189..=191).For BC1_UNORM (71),
D3D12_FORMAT_SUPPORT1_RENDER_TARGET(0x4000) is now properly cleared (support word0x9013e0instead of0x7fff_ffff).Verification results:
victory-gpupassed cleanly, including unit testformat_support_reports_native_capabilities_or_fallback.cargo clippy -p victory-gpu --all-targets -- -D warningspassed with zero warnings.cargo xtask policyverified (152 files ok).Branch:
https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/gpu-format-support-query
Imported from Marvisak/VIctory. Originally posted by Super-cod on 2026-11-24T15:24:47Z.
I have implemented and verified a fix for this issue:
7a14e4cSummary of Changes
esource::pc_format(q[0]), and unmapped console formats (116, 117, 189..=191) zero out \Support1\ and \Support2\ to prevent invalid view creation on the host.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:47:21Z.
Automated triage for the maintainers.
Confirmed on current
main. Incrates/victory-gpu/src/device.rs,check_feature_supportanswersFORMAT_SUPPORTwith fixed masks (0x7fff_ffff/0xffff) for every format. Its ownshortcut:comment says it should answer from the host device. So BC1 and the formats with no host mapping are reported as render targets. TheMULTISAMPLEbranch next to it (the follow-up comment) also reports one quality level for sample counts 1, 2, 4 and 8 whatever the format.The fix is in an open pull request: #1369 by the reporter, which forwards both queries to the host device through
resource::pc_format. It's labelled as needing a rebase onto currentmain. The fork branches in the comments carry the same change. Pull requests are open to everyone, so further work should go to #1369 or a new PR.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T09:08:56Z.
#3490 is a focused fix for the BC render-target flags. The guest query uses VIctory's existing block-size table and clears the same three render-target flags for all standard BC formats on every adapter. The new device test fails on main and passes with the fix. Native WARP reports the same three flags for all 21 BC formats and the RGBA8 control.
The PR lists the full Windows comparison and the evidence needed for review. AI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T12:26:26Z.
#3517 covers the multisample-quality query discussed here. With
2356e25, all standard BC1–BC7 formats report one level at one sample and zero at 2, 4 and 8. The direct WARP check gave the same results in all 84 BC queries, and RGBA8 returned one level at each count. The two guest regression tests also passed with #3490 and #3517 applied together. This measures the device query with synthetic inputs. A game call-site observation is still open.AI-assisted with OpenAI Codex.