fix(agc): accept TRUNC_COORD on unnormalized samplers #12983
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12983"
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 Oscar45397 on 2026-10-29T19:20:15Z.
What
An S# with
FORCE_UNNORMALIZEDandTRUNC_COORDset was refused (guest sampler descriptor uses unnormalized coordinates with TRUNC_COORD, which is not implemented). Skyrim (PPSA03747) stops on it about once in 15 runs.TRUNC_COORDis already accepted and not applied for normalized coordinates. Its debt entry records the RDNA 2 measurement: 1 truncates the scaled coordinate to 8 fractional bits, 0 rounds it. The unnormalized path now treats it the same way, so the host sampler is the one the same S# gets without the bit.TRUNC_COORDamong the bits that throw, and theTRUNC_COORDentry now says it covers both coordinate modes.MC_COORD_TRUNCstill throws.Tested
Windows 11 Home 26200, Ryzen 9 5900X, NVIDIA GeForce RTX 3080 (driver 610.88), WinLibs GCC 15.2.0 r7, Release, on
mainbb04a4f1ea.GuestSamplerResource.cpp(inagc_driver_graphics): the rejection check is replaced by decoding an unnormalized point and bilinear S# withTRUNC_COORDand requiring the same host sampler as without it.ImageSampleUnnormalized.cpp: the bilinear clamp-to-last-texel, point clamp-to-last-texel and point clamp-to-border samplers are also run withTRUNC_COORDset. Every sample is checked against the CPU reference (floor for point, bilinear weights otherwise) and must equal the sample without the bit.main's refusal put back, both tests fail on it (uses unnormalized coordinates with TRUNC_COORD, which is not implemented).ctest -R '^(agc_driver_graphics|agc_driver_image_sample_unnormalized|agc_driver_image_sample_shared_sampler|agc_driver_image_sample_vcc_sampler)$' -VwithANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationonmainbb04a4f1eaand on this branch (headc720a286f7), same machine, 3 runs each: 4 of 4 pass on both in every run. Neither log has aVUID-line, a validation warning or the missing-layer message;VK_LOADER_DEBUG=layershows the layer inserted in all 3 Vulkan processes of each run on both sides.TRUNC_COORDfrom that entry's list of bits that throw. #7085 edits theFORCE_UNNORMALIZEDdebt entry just above these two lines; the edits do not touch the same text, so a merge only needs both kept.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-10-29T22:06:03Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The sampler change and targeted GPU evidence are scoped and documented, but the PR still has unresolved overlap with #7085 and #11126 without an agreed order or matching
Depends ondeclaration.What I ran
Exact head:
c720a286f73b445764803744e53072fea12236d3; base branch:mainatd820fef1827f27247cd28da7b4eec7891904bae5. The merge preview against currentmainis clean (1dba04aa5e1d0922fa8d83562759ac1fcbbc5387). Environment: Linux x86_64; no build or CTest run.Results
mainGuestSamplerResource.cppanddocs/dev/debt/libSceAgcDriver.md.docs/dev/debt/libSceAgcDriver.md.Exact pairwise merge conflict output
Negative control
TRUNC_COORDmainon bothmainand the changeFindings
Blocking
The overlap workflow lists #7085 and #11126 as conflicting PRs, and pairwise merge previews confirm the conflicts. The current checklist says
Depends on: none, while the repository requires authors to agree on ordering for overlapping PRs and declare it withDepends on. Please coordinate the order with both authors and update the checklist to the agreed dependencies (or document the agreement and why no dependency is required); I will re-check the combined merge state afterward. Pinned contribution ruleNon-blocking
The added GPU checks establish the behavior on the reported NVIDIA setup. They do not independently establish console behavior; the updated debt entry keeps the precision difference and unmeasured host-driver behavior documented. No title was run, as stated in the PR.
Sources
Not verified
I did not build or run CTest, repeat the reported GPU tests, or verify behavior on a console or another GPU vendor. Linux and specialized hosted CI jobs were skipped.
To get this to a good state
Please coordinate merge order with the authors of #7085 and #11126, then update
Depends onto reflect that agreement. I will rerun the pairwise merge previews and static checks on the new head.