Repository navigation
fix(shader): point-filter direct samplers paired with unsigned integer images - #7707
Conversation
…r images A direct sampled image of the unsigned integer class kept its sampler's linear filter, while signed integer, converted and depth views got the point-filtered copy. Vulkan formats like R32_UINT have no linear filter support, so the sample was undefined (NVIDIA returned the point sample, lavapipe did not) and the validation layer reported VUID-vkCmdDispatch-magFilter-04553 for agc_driver_image_table. Unsigned integer images now get the point-filtered copy too, as image table entries already do. Fixes boykopovar#7699 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Hardware data for "on AMD hardware, integer formats aren't filtered": RX 6700 XT (gfx1031, RDNA 2), native
So with a linear S#, the hardware returns the unsigned integer texel a point S# returns, the one containing the coordinate ( |
|
RDNA 4 data: Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
The UHD 770's regular descriptor limits are 200 per stage, so AI-assisted: yes (Claude Code) |
|
@milescoviello independent Windows validation on main
The failing control changes only the expected uint sampler copy. Full default and explicit
AI-assisted validation/report: yes, Codex. |
|
@thuanquang @savvaniss @Amoenus thank you, all three are in the description now.
AI-assisted: yes (Claude Code) |
|
First AMD-on-Linux (RADV) data for this PR. Merged onto Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8. Khronos validation layer 1.3.275, confirmed loaded with
The only other Full suite without the layer ( GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
@DavidAmsellem thank you, that fills the RADV-on-Linux cell. The error goes away on gfx1100 too, the old layer's noise counts match on both sides, and the full suite matches AI-assisted: yes (Claude Code) |
|
Checked the diff against the description: |
What
agc_driver_image_tablepasses, but the Khronos validation layer reportsVUID-vkCmdDispatch-magFilter-04553once per process on every device @Amoenus checked (#7699). A sampled image with anR32_UINTview is used with aVK_FILTER_LINEARsampler, andR32_UINThas noSAMPLED_IMAGE_FILTER_LINEARsupport.The dispatch is the test's direct-binding control
RunDirect(device, LinearWrap, uintImage), a directuintT# under a linear S#. A run with the validation layer and a marker before each of the test's dispatches puts the error right after that call, once per process on both NVIDIA and lavapipe.Direct bindings choose which samplers get a point-filtered copy in
DescriptorBindingBuilder.cpp(samplerMode). That rule covers signed integer, converted and depth views, but not unsigned integer ones. Image table entries already use the point-filtered copy for both integer classes (requiresPointSamplerinResourceMaterializer.cpp). #757 first made the direct rule cover unsigned images too, after lavapipe returned a non-point result for this pairing. The rule inmaincovers signed images only.This PR adds the unsigned integer class to
samplerMode, so a directuintbinding under a linear S# gets the point-filtered copy, as table entries and signed views do. On AMD hardware, integer formats aren't filtered either, so the point sample is what the guest sees. The test's control now expectsPointWrapfor the directuintbinding. Float bindings keepLinearWrap.Tested
Ubuntu 24.04 (Linux 6.8), GCC 13.3, Release; NVIDIA GeForce RTX 4070 Ti (595.99.02) and lavapipe. The Khronos validation layer is Ubuntu's 1.3.275 package, loaded with
VK_LAYER_PATHandVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.main0c25997 under the layer:agc_driver_image_tablepasses but reportsVUID-vkCmdDispatch-magFilter-04553once, on NVIDIA and on lavapipe, right afterRunDirect(device, LinearWrap, uintImage).magFiltererror on either device. The only report left isVUID-VkDeviceCreateInfo-pNext-pNext, which this older layer gives onmaintoo for newer device extensions.agc_driver_image_tablepasses 3 of 3. Withmain'sDescriptorBindingBuilder.cppunder the updated test, it fails withimage table: the direct bindings under a linear S# changed their sampler copies.image|sampler|^agc_driver_graphics$pass.image_sample_lzon an RX 6700 XT (gfx1031, RDNA 2) through HIP. Under a bilinear S#, a32_UINTT# returns the texel under the coordinate (floor(u)), the same as a point S#, while32_FLOATblends. That is what the point-filtered copy gives a directuintbinding. This is desktop RDNA 2, not a PS5, and covers unsigned 32-bit only.main6b8228b.agc_driver_image_tablepasses 3 of 3, and fails with only this PR's test changes. An Intel UHD 770 can't run it either way, becausemainrefuses its image tables before this code (fix(agc): bind image and sampler tables through update-after-bind limits #6647).main97d5d7a with this change, on an RTX 5080 and an AMD Radeon iGPU (Khronos 1.4.363). On unmodifiedmain, the test passes 3 of 3 with onemagFilter-04553per process. With only the test change, it fails 3 of 3 at the sampler-copy assertion. With this PR, it passes 3 of 3 with no validation errors.VK_LAYER_PATH,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -V, RTX 4070 Ti, Linux. Neither log reportswas not found but was requested by env var VK_INSTANCE_LAYERS.^agc_driver_image_table$: onmain017f215 it reportsmagFilter-04553×3 andVkDeviceCreateInfo-pNext-pNext×3. With this PR it reports onlypNext-pNext×3, which this older layer gives for newer device extensions.main017f215 reportsmagFilter-04553×2, and this PR reports nothing.mainc4708fa, under the 1.3.275 layer withVK_LOADER_DEBUG=layerconfirming it loaded.magFilter-04553goes from 1 to 0, the old layer's two noise VUIDs have the same counts with and without the PR, and the full suite is 1631/1633 on both, with the same two failures.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code