Skip to content

Formats: reject invalid GFX10 swizzle modes for 1D textures - #1607

Closed
zhaibingye wants to merge 1 commit into
Marvisak:mainfrom
zhaibingye:fix/gfx10-1d-swizzle
Closed

zhaibingye wants to merge 1 commit into
Marvisak:mainfrom
zhaibingye:fix/gfx10-1d-swizzle

Conversation

@zhaibingye

Copy link
Copy Markdown
Contributor

Main gives a 128-texel R32 1D array (3 slices) a 12,288-byte layout with SW_256B_S. AMD Addr2ComputeSurfaceInfo rejects it. Enforce the GFX10 1D mask for explicit layouts. The regression test covers IDs 0 through 27 and a height-one 2D control, with sizes verified against Navi 21 addrlib.

AMD reference: https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/imported/addrlib/src/gfx10/gfx10addrlib.h#L109-L141

The 1D expectation in pending PR #315 assumes every known mode is valid and would need updating if both land.

Verified red on main. Formats tests: 24 passed, 4 ignored. Clippy and asset policy passed. Linux HLE tests are blocked by the existing Windows-only host_resource definition.

@DenRakEiw DenRakEiw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally merged onto origin/main (Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-formats — 24 passed, 0 failed (4 ignored), including one_dimensional_textures_accept_only_gfx10_1d_swizzles
  • cargo clippy -p victory-formats --all-targets — 0 warnings
  • cargo xtask policy — ok

Clean validation rejecting invalid GFX10 swizzle modes for 1D textures with targeted unit test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

zhaibingye added a commit to zhaibingye/VIctory that referenced this pull request Nov 24, 2026
Backport Marvisak#1607. Verified victory-formats against the cumulative fork tree: 25 passed, 4 ignored.
@Marvisak Marvisak closed this Nov 24, 2026
nazmi added a commit to nazmi/VIctory that referenced this pull request Nov 24, 2026
…le validation

Integrated: Marvisak#1282 (fold a conditional branch to its fallthrough, with a guard
so s_cbranch_cdbg* stays refused - without the guard the fold silently
accepted four debug branches that effects() refuses), Marvisak#1360 and Marvisak#1362
(hardware tests for s_min/s_max and s_lshl_add), Marvisak#1490 (freed XMem page
numbers are reused instead of growing the pool), Marvisak#1607 (1D textures accept
only GFX10 1D swizzle modes rather than computing a size from an invalid
layout).

Refused: Marvisak#1523 (withdrawn by its author; three NVIDIA GPUs all cap at exactly
1,000,000). Duplicate: Marvisak#512.

Gate at c7c2a72: fmt 0 differing, both Clippy gates 0 errors, policy 219
files, workspace 685 passed / 0 failed with the 10 documented GPU skips. One
earlier run in this session reported a single failure that did not reproduce
in a full re-run; it is recorded as unreproduced rather than dismissed.
@zhaibingye
zhaibingye deleted the fix/gfx10-1d-swizzle branch November 25, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants