Reject multisampled linear texture layouts #629
No reviewers
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!629
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/629/head"
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?
@AlanQiang0418 on GitHub · 2026-11-24 05:55 UTC · original
AlanQiang0418:codex/reject-linear-msaa-layouts→main· +22 −1 · 1 files · 1 commits · merged 2026-11-25 00:20 UTCLayout::newaccepted a 256 × 256 linear RGBA8 surface at 2× MSAA and returned an addressable 262,144-byte layout, the same size as at 1×. The linear path calculates row sizes and offsets for a single sample. AMD’s GFX10 address library rejects this combination during swizzle validation. AMD reference implementationThis change rejects the descriptor with
Error::Invalidbefore constructing the layout. The regression test covers 2×, 4× and 8×, checks that the 1× linear texture stays addressable, and checks the allocation size for each sample count withSW_64KB_R_X.The regression test failed on
d2a4baeand passed with the fix.cargo test --locked -p victory-formatson Windows passed 21 tests. The three tests that require external data were skipped. The staged asset-policy check passed. Testing used synthetic descriptors.@geiyiliyabumo on GitHub · 2026-11-24 10:52 UTC · original
Independent verification & code review on Windows 11 Pro (build 26100, Rust
1.98.1), cleanly merged ontomain(ffe310e):cargo xtask policy: PASS (154 files ok)cargo clippy -p victory-formats --all-targets --locked -- -D warnings: PASScargo test -p victory-formats --locked: 24 passed, 0 failed, 4 ignored (including newtexture::tests::linear_layouts_require_one_sample)Diff review (
crates/victory-formats/src/texture.rs): minimal, exact, and well-tested — rejectingd.samples > 1forSwizzle::LINEARprevents under-sized linear layouts while preserving tiled MSAA (SW_64KB_R_Xetc.).AI-assisted; synthetic tests only, no game files.
@molodayamama on GitHub · 2026-11-24 14:08 UTC · original
Independent Windows check of
350f91c23a9402b2a556a84c208a80030910ae3f(Windows 10 22H2 19045, Rust 1.98.1, MSVC x64).cargo test --locked -p victory-formats --lib linear_layouts_require_one_sample -- --nocapture: 1 passed.The new fixture passed for rejecting multisampled linear layouts. This checks the texture descriptor validation before allocation or GPU work.
Only source-built synthetic fixtures were used. AI-assisted verification.
@Yoshi-233 on GitHub · 2026-11-25 02:47 UTC · original
I checked the backport on native x86-64 Linux (Ubuntu 24.04.5, Rust 1.98.1). On
Zettrox/ztrx@90b529f, the new test failed before the fix: a 256×256 RGBA8 linear descriptor returned 262,144 bytes at 1×, 2×, 4× and 8×. Your patch applied unchanged. Afterwards only 1× succeeded for linear; the tiledSW_64KB_R_Xcontrol still returned 262,144 / 524,288 / 1,048,576 / 2,097,152 bytes. All eight outcomes matched upstream940d32f.The downstream
victory-formatslibrary suite passed 25 tests after the backport, with four repository-marked tests ignored. This was a CPU-only descriptor check with synthetic inputs.