Skip to content

gfx10: preserve the separate volume filter in sampler words - #959

Open
Kadamitas wants to merge 1 commit into
ProjectLeonida:mainfrom
Kadamitas:fix/gfx10-sampler-z-filter
Open

Kadamitas wants to merge 1 commit into
ProjectLeonida:mainfrom
Kadamitas:fix/gfx10-sampler-z-filter

Conversation

@Kadamitas

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: Preserve the separate Z filter in GFX10 sampler descriptor words. This is a descriptive claim for an unlisted item. A formal ID was requested in the original finding.

What and why

A sampler with word2 = 0x01000000 loses its volume filter when decoded and re-encoded on a28927849. Z_FILTER occupies bits 25–24, between the XY filters and MIP_FILTER. Preserving those two bits lets the codec reproduce the sampler words supplied by the application. The change is confined to the descriptor representation and its CPU test. Independent reproduction

Tested

Built runtime/test/gfx10_descriptors_test.cpp with MinGW-w64 GCC 15.2, -std=c++20 -O2 and Vulkan headers on Windows x64. The test passed the point and linear encodings, all nine combinations of the defined Z and mip filter values, and the existing descriptor and 94-format checks. git diff --check and the repository game-data guard passed for both changed files.

GPUs tested: n/a. All changes and checks here concern CPU descriptor encoding.

AI-assisted: yes.

@KernelSmoker KernelSmoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified on draft head fa90ff469dcd2d19c3af770068a7449d602c76cd with an independent Fedora 45 Linux build of runtime/test/gfx10_descriptors_test.cpp: GCC 16, C++20, -O2 -Wall -Wextra -Werror -Wno-missing-field-initializers -pedantic; the test passed, including the 94 format rows and the new point/linear plus Z/MIP cross-product round trips. check_no_game_data.py and git diff --check passed. Synthetic descriptor words only; no game data/GPU.

This verifies the stated codec round-trip fix. vulkan_sampler() still has no separate Z-filter mapping (Vulkan applies min/mag filtering across spatial axes), so this review does not claim changed runtime 3D texture filtering behavior.

@sodove

sodove commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Independent CPU check on Windows x64, MSVC 19.44.35220, comparing parent a28927849 and PR head fa90ff469. I ran the repository's gfx10_descriptors CTest on each revision and a separate raw-word round-trip probe compiled unchanged against each header.

The probe crossed all four XY magnification and minification values with the three defined volume-filter values and three mip-filter values (144 inputs). On the parent, 96 inputs lost their nonzero Z filter. All other bits stayed unchanged. On this head all 144 inputs round-tripped exactly, including the adjacent XY and mip fields. The repository CTest passed on both revisions. This checks descriptor encoding and decoding on the CPU.

Synthetic inputs only. AI-assisted: OpenAI Codex.

@Kadamitas
Kadamitas force-pushed the fix/gfx10-sampler-z-filter branch from fa90ff4 to c614d98 Compare November 24, 2026 20:17
@Kadamitas
Kadamitas marked this pull request as ready for review November 24, 2026 20:17
@Kadamitas
Kadamitas force-pushed the fix/gfx10-sampler-z-filter branch from c614d98 to f7f7661 Compare November 27, 2026 18:56
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