Reject multisampled block-compressed texture layouts #410
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!410
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-410"
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?
@safesearch77 on GitHub · 2026-11-28 13:25 UTC · original
safesearch77:fix/formats-reject-msaa-bc→main· +60088 −5430 · 206 files · 660 commits · closed without mergingLayout::newallowedsamples > 1for any 2D, single-mip, non-linear layout without checkingblock == 1, which accepted multisampled block-compressed (BC1–BC7) texture descriptions even though block-compressed formats only support single-sample layouts.Require
d.block == 1wheneverd.samples > 1inLayout::new.Ported from
trustno1-coder/VIctory-NVIDIA@5b6955c8(byDamokles2).Verification
cargo +1.98.1 test --locked --target x86_64-pc-windows-msvc -p victory-formats --lib(Wine):52 passed; 0 failed; 8 ignored(pure CPU tests), includingbc_formats_accept_single_sample_layouts,bc_formats_reject_multisampled_layouts(BC1–BC7 at2x/4x/8x), anduncompressed_formats_keep_multisample_layout_rules(R8G8B8A8_UNORM,R10G10B10A2_UNORM,D32_FLOATat4xtiled vsLINEAR).cargo +1.98.1 test --locked -p victory-formats --lib(native Linux):52 passed; 0 failed; 8 ignored.cargo +1.98.1 clippy --locked --target x86_64-pc-windows-msvc -p victory-formats --all-targets -- -D warnings: clean (0warnings).cargo +1.98.1 xtask policy:asset policy: 322 files ok.@TaynanGT on GitHub · 2026-11-29 11:35 UTC · original
Thanks for isolating the invalid multisampled BC layout. Please retain a positive uncompressed multisample case and a normal single-sample BC case alongside the rejection test.
@safesearch77 on GitHub · 2026-11-29 13:17 UTC · original
Thanks. The three tests in this PR already cover what you asked for:
uncompressed_formats_keep_multisample_layout_rulesis the positive uncompressed case. It checks that 4x R8G8B8A8_UNORM, R10G10B10A2_UNORM and D32_FLOAT with a 64 KiB swizzle still give a valid layout, and that a LINEAR multisampled layout is still refused, as before.bc_formats_accept_single_sample_layoutsis the normal single-sample case: every BC1–BC5, BC6H and BC7 DXGI format (70–84, 94–99) at one sample.bc_formats_reject_multisampled_layoutsis the rejection: the same formats at 2, 4 and 8 samples returnError::Invalid.I see #439 already has this fix (
d.block == 1inLayout::new) and these three tests, unchanged, in42c0244. I'm happy to close this PR as included once #439 lands, unless you'd rather merge it on its own first.Re-run today under Wine:
victory-formats --libpasses 52/52 (8 ignored), including all three.AI-assisted: yes (Claude), reviewed locally before posting.
@TaynanGT on GitHub · 2026-11-29 14:39 UTC · original
Thanks for the positive and negative layout cases. I confirmed the BC rejection test is present in my current local tree. I will keep the normal single-sample BC and uncompressed MSAA tests as well. No need to close this separately until the integration is verified and published.
@TaynanGT on GitHub · 2026-11-30 17:08 UTC · original
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed