gfx10: preserve the separate volume filter in sampler words #959
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/959"
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?
Imported from ubiquitarianism/leonida. Originally posted by Kadamitas on 2026-11-24T15:43:39Z.
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 = 0x01000000loses its volume filter when decoded and re-encoded ona28927849.Z_FILTERoccupies bits 25–24, between the XY filters andMIP_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 reproductionTested
Built
runtime/test/gfx10_descriptors_test.cppwith MinGW-w64 GCC 15.2,-std=c++20 -O2and 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 --checkand 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.
Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T15:45:45Z.
Review: APPROVED
Verified on draft head
fa90ff469dcd2d19c3af770068a7449d602c76cdwith an independent Fedora 45 Linux build ofruntime/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.pyandgit diff --checkpassed. 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.Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T15:53:06Z.
Independent CPU check on Windows x64, MSVC 19.44.35220, comparing parent
a28927849and PR headfa90ff469. I ran the repository'sgfx10_descriptorsCTest 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.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:31:02Z.
#959 | head
f7f766145b(merged cleanly with main829530dbd0— no conflicts on currentmain) |ctest --test-dir runtime/build -C RelWithDebInfo -R "^(gfx10_descriptors|d3d12_sampler2|d3d12_descriptor)$" --output-on-failure(LEONIDA_VK_VALIDATION=1) | red proof: omittingfield(std::uint32_t(sampler.volume_filter), 24, 2)inruntime/src/gfx10_descriptors.hfailsgfx10_descriptorsatline 341: (one_field({.volume_filter = VolumeFilter::point}) == SamplerWords{0, 0, 1u << 24, 0})| green on PR+main:3/3CTests (gfx10_descriptors—T#, S# and V# fields, round trips, 95 format rows and the Vulkan mappings OK,d3d12_sampler2,d3d12_descriptorincludingvolume SRVs: 0 of 256 sampled RGBA texels differandvolume minimum LOD: 256/256 samples matched) pass in1.71 son RTX 3090 with0Khronos validation errors;check_no_game_data.py0violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yesImported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:17:43Z.
Verified by OreoFR
48bae6cad+ PR headf7f766145(tested as a merge)ctest -R ^gfx10_descriptors$(RelWithDebInfo, Ninja)VolumeFilteris not declared): the missing field is the change itselfgfx10_descriptorspassesgta6rt.exebuilds and links;dumpbin /dependentsshows the same DLLs as main, no network DLL)5825b02ff; it also merges cleanly together with #2089, same two files)AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T08:12:58Z.
Merged. Tested by @zmasi on head
f7f766145(RTX 3090, Windows 11): gfx10_descriptors CTest: red with volume_filter field omitted (line 341), green 3/3 CTests; OreoFR: test not compiling o. Correction: I had not shown that every failed or cancelled CI job on this head was also red on main. Not shown: macos-python (cancelled). My earlier sentence was too broad. Thanks @Kadamitas!AI-assisted: yes