test(agc): bias the clamped LOD case by -0.75 so NVIDIA's mip switch cannot flip it #23992
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23992"
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 MichonGoddijn231849 on 2026-11-20T00:20:37Z.
What
agc_driver_image_sample_lod_clampandagc_driver_image_sample_lod_clamp_shader_lanefail on several NVIDIA GPUs withimage_sample_d_cl with T# MIN_LOD 256 over BASE_LEVEL 1 with S# MAX_LOD 4095, mip filter 1 and LOD bias -96: thread 2 component 0 is 2.000000, expected 1. That covers the RTX 3070 Ti and RTX 4070 SUPER reported in #23232, and my RTX 5080 on driver 610.74. The cause is the host's nearest-mip choice, not the translation:Mip selection and blending on NVIDIAdebt entry, measured on the same RTX 5080 and driver.This PR changes only that case's bias, from -96 to -192 (-0.75). Every lane's expected LOD then sits a quarter level away from both 0.29 and 0.5, so either rounding gives the same level.
The new bias also covers more. In the shader-clamp lane (
APS5_NO_IMAGE_VIEW_MIN_LOD=1 APS5_NO_GPL=1), this case is the onlyRunAndCheckcase with a bias. There, theimage_sample_cllanes clamp at 1 and then add the bias:Measurement of the switch point: Lyrnc's
--lod-bias-probefrom #23232, changed locally to sweep the S# bias from -40 to -132 in steps of 4 on lane 2 (gradient-only shader,MIN_LOD0,BASE_LEVEL0 and 1, LOD 1.75):I also ran candidate biases on both GPUs and both lanes:
image_sample_clthread 3, where clamp 1 minus 0.5625 or 0.625 leaves a fraction above 0.29Tested
Windows 11 Pro 10.0.26200, MinGW Release build.
ctest --test-dir build -R '^agc_driver_image_sample_lod_clamp' -VwithANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, onmainand on this branch:mainNVIDIAmainAMDInsert instance layer "VK_LAYER_KHRONOS_validation"was not found but was requestedVUID-Negative check: I changed the fixture's expected
image_sample_cllevel from clamp-then-bias to bias-then-clamp. On AMD, the shader-clamp lane then:image_sample_cl with T# MIN_LOD 256 over BASE_LEVEL 1 ... LOD bias -192: thread 3 component 0 is 1.000000, expected 2;The image-view lane fails in both cases on its earlier bias-256 case.
The 1D mip blend failure in #23232 (
agc_driver_image_plane_address_on_line) is not touched; draft #6221 tracks it.tools/pr_overlap.py: no overlap with open pull requests. Not tested on a PS5.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 MarcZX10 on 2026-11-20T06:36:06Z.
Review: APPROVED
Reviewed — looks good
The reviewed change updates the LOD bias for the reported clamped sampling case; the inspected logic and stated GPU results support merging.
What I ran
Reviewed head
0919e069759a1949941f783e4315d4249ba245aa. I did not run commands or tests; results below are reported by the author.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author-reported Windows 11, MinGW, Vulkan test runs and GPU measurements were not independently verified. PS5 behavior was not tested. Read
description.md,commits.md,manifest.json,diff.patch, and the complete changed filecore/libs/prx/libSceAgcDriver/tests/execution/ImageSampleLodClamp.cpp; also read the relevant test CMake registration file.files.jsonwas unavailable, so excluded files could not be independently enumerated; the manifest lists one changed file and marks its full text included.To get this to a good state
Nothing is required.