test(agc): check filter mode 3 on devices without min/max filtering #27671
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27671"
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 boykopovar/AnyPS5. Originally posted by peacocksir on 2026-11-26T22:12:39Z.
What
agc_driver_image_filter_mode_threefails onmainon Mesa lavapipe, the Vulkan device of the Linux CI job:AGC graphics: a sampled texture whose format 37 does not support min/max filtering is sampled through a min or max reduction sampler with linear filtering. #22665 added the test. Before it compares filter mode 3 with filter mode 0, it draws once with a min sampler (filter mode 1) as a control, to show the draw filters between texels. That control draw needsVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BITonVK_FORMAT_R8G8B8A8_UNORM, whichSampler.cppchecks. lavapipe 25.2.8 lists that feature only for single-component color formats and depth formats, not forR8G8B8A8_UNORM(vulkaninfo --show-formats), so the test stops at the control and never reaches the mode 3 check.The control draw now catches exactly that message, the same message
ImageSampleReduction.cppaccepts for the same limit. It printsmin sampler control skipped, the device lacks min/max filtering of 8_8_8_8 UNORMand then runs the mode 3 comparison as before. Any other exception from the control draw fails the test, and the mode 3 draw is outside the catch. A device with min/max filtering on that format runs exactly whatmainruns. No production code changes.Without min/max filtering, the test can no longer show that the draw filters between texels, so identical but meaningless output from modes 0 and 3 would pass there. On such a device
mainfails before reaching any check, so this PR loses no coverage there.Tested
Ubuntu 24.04, kernel 6.8, GCC 13.3.0, Ninja, Release,
BUILD_TESTING=ON. Head3ea90053d0onmain00b15fcbb0. GPU: Mesa lavapipe 25.2.8 (llvmpipe (LLVM 20.1.2, 256 bits)),/dev/udmabufavailable. Validation layer built from source, 1.4.335.Focused runs,
main's test file and this branch's in the same build tree, 3 runs each, withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '^agc_driver_image_filter_mode_three$' -V:main... format 37 does not support min/max filtering is sampled through a min or max reduction sampler with linear filteringmin sampler control skipped, the device lacks min/max filtering of 8_8_8_8 UNORM,filter mode 3 tests passedEvery log shows
Insert instance layer "VK_LAYER_KHRONOS_validation", none showswas not found but was requested by env var VK_INSTANCE_LAYERS, and none containsVUID-.The mode 3 check still runs on lavapipe and still catches the bug #22665 fixed. I ran this branch's test with two local changes, one at a time:
GuestSamplerResource.cpp,ResourceMaterializer.cpp) reverted: fails 3/3 withAGC graphics: guest sampler descriptor uses an unknown reduction filter mode 3, after the skip line.VK_SAMPLER_REDUCTION_MODE_MIN_EXTintoVkReductionMode, with thematerializeBlendingReductionscall removed: fails 1/1 (on the previous base7164924690) with the min/max filtering error, now at the mode 3 draw.Full
ctest --test-dir build --output-on-failure -j6on this branch: 7059/7064 pass. The 5 failures are in other test executables, built from files this PR does not touch:agc_driver_image_d16_load: also new onmainsince #22750; a 16_FLOAT signaling NaN comes back quieted on lavapipe. Not addressed here.agc_driver_scattered_runs: Mesa before 26 (#21649).guest_json_copy_failure(SIGSEGV),guest_libressl3_object_header(timeout) andnkwebkit_wtf(abort): on the previous base7164924690these failed the same way withmain's test file in the same build tree.main's own Linux CI job fails the same way: run 45802485224, on37c33ad6b0, reports99% tests passed, 1 tests failed out of 7016, the one failure beingagc_driver_image_filter_mode_threewith the format 37 error above.python3 tools/check_conventions.py --base origin/main: all checks passed.python3 tools/pr_overlap.py --branch: no overlap with open pull requests.Not tested: any real GPU or console. On a device with min/max filtering of
R8G8B8A8_UNORM, the new catch is never reached and the test runs whatmainruns.Open #27452 also changes filter mode 3 handling (
DescriptorBindingBuilder.cppand the sampler tests inGuestSamplerResource.cpp). It does not touch this test file, and the two PRs do not depend on each other.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
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T22:48:24Z.
Review: COMMENTED
Reviewed — no blocking findings
The change appears consistent with its stated goal, but I could not independently run the reported checks in this review environment.
What I ran
Reviewed head
3ea90053d0977e4c3168fb8876ba726e1f2baa37. Read the PR description, commit list, manifest, diff, and the full changed test file. No commands or tests were run. The description reports Linux lavapipe test runs; those are author-reported results.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports that the focused test passed three times on lavapipe and that the full suite passed 7059/7064 tests; I did not reproduce those results. No other files were changed or excluded from the review. The changed test file was read in full.
To get this to a good state
Nothing is required. The reported tests are useful evidence, but were not independently run here.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:45:51Z.
Review: COMMENTED
The scalar-buffer-base CTest passed on both builds on Linux Mesa lavapipe with Khronos validation 1.4.369. The filter-mode-3 test failed on main when it reached the unsupported min/max sampler. The change passed, with that sampler control explicitly skipped. Both logs show validation insertion with zero missing-layer diagnostics or VUIDs.
AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.