Format support query advertises BC1 as a render target #718
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#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?
@fuzeofficlal on GitHub · 2026-11-24 08:01 UTC · original
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.
@fuzeofficlal on GitHub · 2026-11-24 08:15 UTC · original
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.@LAKSHYA-cmd-tech on GitHub · 2026-11-24 08:34 UTC · original
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
@Super-cod on GitHub · 2026-11-24 15:24 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 01:47 UTC · original
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