docs(debt): measure normalized S# clamp modes 4, 5 and 7 against RDNA2 #22729
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22729"
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-18T05:40:39Z.
What
A debt entry records that a normalized S# with clamp mode 4 (clamp, half border), 5 (mirror once, half border) or 7 (mirror once, border) does not sample like RDNA2.
toVkAddressModemaps mode 4 toVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDERand modes 5 and 7 toVK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE. Vulkan has no half-border or mirror-once-border mode, and these choices give different texels past the edges. #14964 handles modes 4 and 5 for unnormalized samplers in the shader. Its measured rule (point: mode 4 like mode 2; bilinear: clamp the coordinate to the edges and blend half the border) agrees with what I measured here for normalized coordinates, which nothing handles yet.Only
docs/dev/debt/changes/docs-normalized-border-clamp-modes.mdis added; no code changes.Measurement:
tools/hw-oracle, hardware againstagc_oracle_runneron both GPUs. An 8×1 32_FLOAT texture (texel x = 8 + x) was read byimage_sample_lzat 16 normalized x from -2.3 to 2.6, with CLAMP_X 0 to 7, border colour types 0, 1 and 2, and point and bilinear XY filters. The hardware values with opaque black border (border = 0):AnyPS5 on both GPUs gives:
Modes 0, 1, 2, 3 and 6, and mode 5 with a point filter, match on both GPUs for every x and border type.
Tested
Windows 11 Pro 10.0.26200; NVIDIA GeForce RTX 5080 (driver 610.74) and AMD Radeon(TM) Graphics (RDNA2 iGPU, gfx1036, driver 32.0.21045.16010), AnyPS5 at
main. The fragment passestools/debt_fold.py --checkandtools/check_conventions.py. 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