Repository navigation
Conversation
…or-publish-maine1 feat(agc): publish completed native color snapshots
…its chain (boykopovar#22572) * fix(agc): reject a chained INDIRECT_BUFFER that revisits a buffer of its chain * fix(agc): name the revisited chain buffer in the jump loop error
…serve-partial-overlap fix(libkernel): replace the mapped parts of a partly free fixed reservation
…or-cpu-read-main9bf feat(agc): publish native color before guest memory reads
…ovable-window fix(relinker): let short SHA and CLZERO instructions move a neighbour into their stub
…hread-attr-guest-copy fix(libkernel): copy PthreadAttr arguments and schedparam through guest helpers
…les-than-coverage feat(agc): draw a depth target with fewer samples than the rasterizer at its own samples
…-windows-settle-floor test(agc): keep the private gate's direct import under the Windows settle floor
…ard-png-parser fix(libScePngParser): guard metadata scratch writes with GuestArena::HostWrite
…ard-shell-ui-util fix(libSceShellUIUtil): guard guest write check with GuestArena::HostWrite
…ard-move-tracker fix(libSceMoveTracker): guard guest write check with GuestArena::HostWrite
…ard-jpeg-parser fix(libSceJpegParser): guard thumbnail guest writes with GuestArena::HostWrite
…ard-move fix(libSceMove): guard guest write checks with GuestArena::HostWrite
…ard-custom-music-audio-out fix(libSceCustomMusicAudioOut): guard guest write check with GuestArena::HostWrite
…ard-icu-bidi fix(libSceIcu): guard guest write checks in Bidi with GuestArena::HostWrite
…de-host-region fix(libc): place macOS hints inside host regions at the top of the arena
…al-query-committed-direct-only fix(libkernel): report is_committed from sceKernelVirtualQuery only for direct memory, as a PS5 does
…rewind fix(libSceGnmDriver): refuse a REWIND in a submitted draw command buffer
…oat-cb-conversion fix(agc): match the measured CB conversion of 11_11_10 float color targets
…page-range fix(libkernel): round sceKernelMunmap ranges to guest pages
…er-page fix(agc): forget only the rewatched pages that leave the write watch
…edmemory-token-namespaces fix(libkernel): give Windows shared memory per-token namespaces
…pr-window-direct-access feat(shader): keep direct VGPR accesses direct outside indexed-write slots
Lanes of a guest wave run in lockstep, so the SPIR-V emitter puts a wave LDS barrier between an LDS write and the next LDS access when the wave spans several host invocations. It counted only DS opcodes. A flat load or store whose address falls in the shared aperture reaches the same LDS, but it was neither ordered nor counted as an LDS write. On lavapipe (8-lane subgroups) a wave32 runs as four subgroups, which llvmpipe runs one after another between barriers. The flat loads in agc_driver_flat_aperture_lds_bounds therefore read the last LDS dwords before the subgroup that writes them had run: 10 of 10 runs failed on main (41 mismatches) and 0 of 10 with this change. WaveLdsAccess counts an address access that routes through the apertures (flat, compute stage) by its read, write or atomic kind, and both WaveLdsScope and the per-block ordering use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0125gxvaRgLMwjs53eqvUzya
|
Thank you for your contribution! Authors with no pull requests merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Lanes of a guest wave run in lockstep, so a lane can read LDS another lane of its wave just wrote. When the wave spans several host invocations, the SPIR-V emitter puts a wave LDS barrier between an LDS write and the next LDS access (
WaveLdsScope, and the per-block ordering inSpirvFlowEmitter.cpp). Both only counted DS opcodes (SharedAccessOf). A flat load or store whose address falls in the shared aperture reaches the same LDS (RouteFlatAccess→LoadApertureElement), but it was neither ordered nor counted as an LDS write.On lavapipe (8-lane subgroups) a wave32 runs as four subgroups, which llvmpipe runs one after another between barriers. In
agc_driver_flat_aperture_lds_boundsthe init loop writes LDS dwords 1022-1023 only from lanes 30-31, the last subgroup. The flat loads of the earlier subgroups ran before that subgroup had, so loads at 0xff8-0xfff returned 0, while theds_read_u8of the same bytes, which had a barrier, was correct. The SPIR-V showed anOpControlBarrierbefore each DS access and none before the aperture-routed flat loads.WaveLdsAccess(next toRoutesApertures) counts an address access that routes through the apertures (ResourceKind::Flat, compute stage) by its read, write or atomic kind. BothWaveLdsScopeand the per-block ordering use it. DS classification is unchanged.Tested
Ubuntu 24.04.5, GCC 13.3, Release, lavapipe (Mesa 25.2.8, LLVM 20.1.2, 8-lane subgroups),
main1341e22.agc_driver_flat_aperture_lds_bounds,ctestwithANYPS5_REQUIRE_VULKAN=1: 10/10 runs failed onmain(41 mismatches), 0/10 with this change. It fails the same way onmainwith Mesa 26.3.1 / LLVM 21.1.8 (kisak PPA), so it is not a lavapipe version issue. fix(libc): scan /proc/self/maps without a new descriptor or allocation boykopovar/AnyPS5#28045 reports it passing on an RTX 5080 and a Radeon iGPU, where a wave32 is one subgroup.ctest -R '^agc_'(2,312 tests) with this change: 8 failed. Each is also red onmainon this machine, with a reason unrelated to this change:agc_driver_image_d16_load: test(agc): accept any 16-bit NaN from D16 loads of signalling 16-bit float texels off the AMD driver boykopovar/AnyPS5#28115.agc_driver_image_filter_mode_three: test(agc): check filter mode 3 on devices without min/max filtering boykopovar/AnyPS5#27671.agc_driver_gcn_multisample_color_fill: test(agc): skip the PS4 multisampled color fill test without 2-sample color targets boykopovar/AnyPS5#27800.agc_driver_image_sample_lod_clamp_shader_lane: test(agc): leave the LOD bias -192 case out on lavapipe before Mesa 26.1 boykopovar/AnyPS5#27777.agc_driver_upload_cache_read_only_flush: test(agc): watch the sparse flush image again when a GPU store leaves it unwatched boykopovar/AnyPS5#28086.agc_driver_write_back_guest_newer: test(agc): skip the guest-newer write-back cases where host imports are compared boykopovar/AnyPS5#28124.agc_driver_draw_recipe_data: test(agc): destroy the draw recipe test's deferred batches inline boykopovar/AnyPS5#28235.agc_driver_depth_fewer_samples: "depth/stencil format 130 cannot hold 2 samples on this device"; 0/5 onmainwithout this change as well.^agc_driver_(flat_aperture.*|.*lds.*|ds_.*|.*_lds|flat_.*)$ran onmainand on the change withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1and the LunarG layer 1.4.363.1, usingctest -V. Both logs showInsert instance layer "VK_LAYER_KHRONOS_validation"55 times, neither containswas not found but was requested by env var VK_INSTANCE_LAYERS, and both have 0VUID-lines and 0 validation warnings.main: 54/55 pass (flat_aperture_lds_boundsfails); this change: 55/55.WaveLdsScopealready does for DS accesses. I recompiled 1,999 shader requests captured from the AGC tests (agc_shader_replay --spv) onmainand with this change. 3 modules changed theirOpControlBarriercount (1→4, 1→4, 0→1); the other 1,996 are unchanged.python3 tools/check_conventions.pypasses.tools/pr_overlap.py --branchran against the open PRs (the list came from the search API andgit ls-remote, becausegh apiwas unavailable). The PRs it could not merge into the base share these large files; checking their diffs found none that change the wave LDS ordering lines. fix(shader): broadcast Wave32 readfirstlane on narrow subgroups boykopovar/AnyPS5#25660 edits the adjacentbdaStopsInvocationsline.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
https://claude.ai/code/session_0125gxvaRgLMwjs53eqvUzya