Repository navigation
feat(agc): accept texel offsets with unnormalized sampler coordinates - #822
Conversation
|
Checked the last commit:
@boykopovar @oneandonlydean one design question before merging: this adds |
|
Thanks for measuring it. 3840 bit-identical cells on gfx1035 is much better evidence than I had. I'll change the TechnicalDebt line to say the folding was measured on RDNA2 (offset applied before the clamp) and push it together with the rebase onto The ResourceSpecialization question is the owner's call. If #639 should absorb it, I'm happy to hold this one or port the fold into #639's sampler path when that lands. |
759c741 to
dfcf72c
Compare
dfcf72c to
c6cc8ed
Compare
c6cc8ed to
d84d4ce
Compare
|
A title that needs this: Ghost of Yōtei (PPSA26344 v01.008.000, retail). Linux, RX 9070 XT, Mesa 26.2.4 RADV. On current That is the message this PR replaces. I couldn't run both together: #759 and this PR merged on current Tested and written by Claude (AI assistant) on a contributor's machine. |
|
Thanks for running Yotei on the 9070 XT. Seeing #759 stop on the texel-offset error in the compute shader 0x8000265d00 on RADV is really useful, because it confirms that #822 is the next stop after #759 on AMD as well. The conflicts come from both PRs editing the same sampler and specialization structs, the disk cache encoder and the sample emitter, and from both moving the cache format from 9 to 10. I've pushed the merge of the two current heads (#759 at 6fb7f68, #822 at d84d4ce, both on main b3fcd6d) to https://github.com/Celegans12/AnyPS5/tree/test/yotei-759-822. Both behaviours are kept, and the cache format goes to 11 because the two encodings differ. Upstream's Linux job passes on it with lavapipe (464/464), and the image table, null pointer, unnormalized sampler and disk cache tests also pass on Windows. I haven't run that exact branch in the game, so I can't tell you where it stops next. In our integration branch, which has these two plus a lot of other open PRs, Yotei compiles that shader and gets into the opening cinematic, though only at a few frames a minute. If you get a chance to run it on RADV, I'd like to know where it stops. Details
|
d84d4ce to
9e50278
Compare
|
Ran Both earlier stops are gone. Neither 0x80003aa700 nor 0x8000265d00 fails. It stops before the first present, after 95 resource builds, on a buffer descriptor this time: The V# is read from a buffer at an offset that a loop counter scales ( Tested and written by Claude (AI assistant) on a contributor's machine. |
|
I tested #1183 on top of In the chain, the offset is a scalar loop counter ( Tested and written by Claude (AI assistant) on a contributor's machine. |
|
Thanks for running it, and for trying #1183 on top. We hit the same 0x8000289300 stop in our runs: with our probe tolerance on, it shows up as skipped dispatches instead of ending the run, so we hadn't looked at it closely yet. Your read of the chain matches what I'd expect: a scalar loop over V#s, not the waterfall case. It's on our list next. |
9e50278 to
88fb2ca
Compare
88fb2ca to
2a35792
Compare
2a35792 to
14399ef
Compare
14399ef to
dbc0609
Compare
dbc0609 to
93d9b5d
Compare
Explicit-LOD offset samples through FORCE_UNNORMALIZED samplers now add sign-extended texel offsets to f32 coordinates before clamping, using OpFAdd with NoContraction and a sampler specialization selector. Without native nonconstant-offset support, retain only runtime image modes valid for unnormalized sampling and reject normalized samplers. Preserve constant-swizzle handling, indirect-image rejection and main's flat-volume and flat-line compatibility rules when selecting those modes. Serialize image compatibility and folding flags and the sampler folding flag in cache format 34, with roundtrip, preparation and execution coverage. Retain main's request format 15 and runtime ABI 11.
|
Rebased onto current
Checked on the rebased tree: build + ctest 388/388 (libSceAgc, libSceAgcDriver); the three PR tests no longer compile without the change; the offset-vs-coordinate-shift fold was measured bit-identical on RDNA2 (3840 cells). Merging once CI is green. |
93d9b5d to
d0d127b
Compare
What
An
image_sample_*_othrough an S# withFORCE_UNNORMALIZEDthrows inPrepare: Vulkan forbids offset operands with unnormalized coordinates.For supported explicit-LOD samples, the registered artifact adds signed texel offsets to f32 coordinates with
OpFAdd/NoContraction, selected from the S# bit. Normalized sampling retains native offsets. Without maintenance8, nonconstant offsets require the folded form; normalized samplers throw.Offset folding excludes gathers, comparison, derivatives, implicit LOD and
_a. Preserve #1417's direct constant-selector modes, including 3D; ordinary selectors cannot match them, and indirect images remain rejected. The rebase retains main'sflatVolumeCompatibleandflatLineCompatiblebesidefoldTexelOffsetsOnly, with matching codec fields and fixtures. Disk format is 34; main's runtime ABI 11 and request 15 remain unchanged.PPSA26344's compute shader 0x8000265d00 uses
image_sample_lz_o. adriadam10 measured 3840 bit-identical offset-versus-coordinate-shift cells on RDNA2 gfx1035 with point/linear filtering and clamp edge cases.Tested
Exact source
93d9b5dd, based onmain57f96fd2: Windows 11 / MinGW-w64 GCC 15.2.0 / NVIDIA and Linux / GCC 13.3 / lavapipe, SPIRV-Tools ON. Focused builds, patched libraries and registration passed. Both platforms passed 4/4 CTests with zero failures or whole-case skips; raw targeted skip checks pass.Cases:
agc_driver,agc_shader_memory,agc_shader_disk_cache,agc_driver_image_sample_unnormalized.Default Recorder also passed on both platforms, including main's swept-buffer staging and image memoization cases. It omitted watched-import refresh, draw-snapshot reuse, unit-shadow and snapshot-patching cases on Windows; Linux also omitted other write-watch cases and the unavailable minimum-LOD extension. These are internal omissions, not passing coverage.
Historical full suites at published
14399efb(main c72d5ce): Windows 570 passed/2 skipped/1 unexplainedvideo_out_flip_lifetimeheap-corruption failure (0xc0000374); unchanged-binary retry 570/3/0. The strict skip gate failed; both VideoOut cases passed native SDL, third skip used a missing ICD. Linux 558/29/0; raw skip checker rejected WSL asynchronous-userfaultfd write tracking, accepted locally, not an upstream pass. Both independent constant-mode controls failed as expected and restored shader-memory passed on that earlier head.Not rerun on this rebase: full suites, earlier constant-mode negative controls, PPSA26344 or console behaviour. Linux uses memory comparisons when write protection is unavailable.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)