fix(test): compare linear-mip 1D samples only against DIM 1D #6221
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6221"
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 mitul72 on 2026-10-15T04:50:46Z.
What
The explicit-LOD test added in #5583 checked the linear-mip cases against an absolute blend of the two mip levels (
10 + 40 * LOD). The weight a host GPU applies between levels is a property of its filtering, not of the 2D-through-1D path. On an RTX 4090 (NVIDIA 616.92), as reported in #5583, the 2D-through-1D sample and the referenceimage_sample_lwith DIM 1D return the same bits but blend with weight 0.4375 at LOD 1.25 instead of 0.25, soagc_driver_image_plane_address_on_linefails onmainthere.The linear-mip cases keep the bit-for-bit comparison with
image_sample_lDIM 1D through the same T#, which is what the feature claims. Point sampling keeps its absolute texel and level checks. Test-only change.Tested
Linux, RX 9060 XT (RADV GFX12):
agc_driver_image_plane_address_on_linepasses. Not run on NVIDIA here; the failing case is the one reported in #5583.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
Imported from boykopovar/AnyPS5. Originally posted by mitul72 on 2026-10-15T04:57:18Z.
Marking this as a draft: the same check passed on an RTX 4090 (same driver) at #5583's pre-merge head a98b06534, so something in the merged combination with #5375/#5456 changed what NVIDIA computes for 1D explicit-LOD samples. I'm comparing the generated SPIR-V and sampler/view state between those heads to find the cause instead of relaxing the test.
Imported from boykopovar/AnyPS5. Originally posted by mitul72 on 2026-10-15T05:47:32Z.
Found the likely cause. Between a98b06534 (passes on the 4090) and
e52e140f5(fails), the SPIR-V, samplers and image views for this case are byte-identical. The only difference is that the sampledVkImageis now created withVK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, from #4487 (sRGB twin views for FORCE_DEGAMMA samplers), for every format that has an sRGB twin, RGBA8 included. RADV is unaffected. @frankea, could you check whether this case returns 60.00 on the 4090 withVK_IMAGE_CREATE_MUTABLE_FORMAT_BITremoved from theimageInfo.flagsline inTexture::Texture? If it does, NVIDIA blends mip levels differently for every mutable-format texture, and the fix belongs in setting that flag only where an sRGB view is actually needed, not in relaxing this test. cc @PipodiImported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-15T22:11:18Z.
@mitul72 Ran it. Removing
VK_IMAGE_CREATE_MUTABLE_FORMAT_BITdoes not change the 4090's result, and neither does reverting #4487 as a whole, so the flag is not the cause.Windows 11 (26200), RTX 4090 (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 r7 (UCRT), Release,
BUILD_TESTING=ON,agc_driver_image_plane_address_on_linewith--repeat until-pass:3:main31cbb55d7thread 12 blends the levels to 67.501945, expected 60.000000main31cbb55d7with theSrgbTwinFormat(...) ? VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT : 0uterm removed fromimageInfo.flagsinTexture::Texture(Texture.cpp:274; the two otherMUTABLE_FORMATsites untouched)e52e140f5(the #5583 merge) with #4487 reverted (git revert -m 1 afc8541d1, clean, 8 files)main31cbb55d7+ this PR's heada0142ae0bSo on this card the value is stable at 67.501945 whatever the image's create flags, and the only thing that changes the verdict is the check itself. Two more facts that narrow where to look:
d1670009f) ande52e140f5(parent4808d9c20) differ only indocs/dev/debt/shader.md(fetched a98b06534's patch from the GitHub API, the object is no longer reachable). So @tibzejoker's pass at a98b06534 and the fail ate52e140f5bracket 411 first-parent merges ofmainbetweend1670009fand4808d9c20, not a change in #5583 itself.git applyof the test file plus the two-lineflatLineExplicitLodchange, identical to the PR's) gives the same 67.501945, 3 of 3 each time, at every point:d1670009f(a98b06534's own parent),9a22507ef(just before #5375),31d951ede(#5375 merged),2077b5383(#5456 merged), ande52e140f5itself. So on this 4090 the linear-mip check never passed at any base; nothing inmainflipped it. The one 4090 pass on record is @tibzejoker's run of a98b06534 on #5583 (same driver, 616.92, a machine that also has an Intel UHD 770 and picks GPUs withANYPS5_GPU); I cannot reproduce it here, and I do not know what differs. Everything on this box says the10 + 40 * LODweight is AMD's and this driver blends 1D mips at 0.4375 for LOD 1.25, which is what this PR's DIM 1D comparison accepts.Side finding from the same runs: with the flag removed,
agc_driver_image_sample_reductionalso failed, but it fails on plainmain31cbb55d7too (min, 2x anisotropic bilinear, point mip: thread 0 sampled 5.000000, expected 17.000000, 2 of 2), so that is a separate NVIDIA failure from #5821, reported there.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by mitul72 on 2026-10-20T18:02:19Z.
Thanks @frankea for running it. So the mutable-format flag isn't the cause; I'll look further. I've been a little busy lately, but I'll get back to this today.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:54:22Z.
Review: APPROVED
Reviewed the complete test change and its surrounding coverage. The exact-bit comparison between the 2D-through-1D explicit-LOD path and the DIM 1D reference remains for every component and sampler case; point-filtered cases also retain independent level and texel assertions. Dropping the absolute linear-mip blend expectation is supported by the reported RTX 4090 result, where both paths agree bit-for-bit but the host blend weight differs from that assertion. The updated PR description accurately scopes the test to the behavior being claimed, and the current eligibility, intake, conventions, and report checks pass. The current overlap scan found no overlapping open PR.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T18:14:05Z.
Review: COMMENTED
This patch conflicts with current
maininImagePlaneAddressOnLine.cpp. The current test already keeps the bitwise DIM 1D comparison and skips the absolute blend check whenTextureLodFidelity::Findidentifies a known explicit-LOD remap. A rebase should preserve that coverage for drivers without the remap. If the reported RTX 4090 is still failing, can the test's remap matcher be corrected for that driver?Source and merge-tree review at
a0142ae0bb. The NVIDIA behavior is unverified locally.AI-assisted: yes.
Pull request closed