Repository navigation
Conversation
This branch has not been deployed
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
Storage-cache eviction can leave a sampled view owning the entire evicted Vulkan image until a later sampled lookup or diagnostic query cleans it up. This current-main port of upstream #5997 drains that existing cleanup after eviction, outside the storage mutex. Recorder and caller ownership still keep live images available. Ondra97's original author is preserved.
This draft adds Linux/Radeon and Lavapipe validation of the existing implementation, including an 8 GB RX 6650 XT. It is a fork validation branch for boykopovar#5997.
Tested
Main
d92a8dad390af1807cc91622b924252141816a5a, public head0c3c750447812f956234f59b01b5dfd1ac905a3f. The full Linux Release project build passed on test headf620afc1b2c19482543eb748d004e7443c669aaf, whose only tree difference from the public head is the private SPIRV-Tools teardown repair gitlink. The public branch retains the official pin; its independent vendor build is unverified.ShaderResources.cppmakes both central Radeon cases fail:the sampled texture cache kept the view of an evicted storage image, andthe rejected descriptor sets retained an evicted storage image.These checks establish an ownership correction. The single native pair below provides preliminary memory and timing data; a repeatable title-level effect and a fix for Saros's GPU fault remain unestablished. Saros's separate startup integration and remaining device loss are recorded in #73.
Integration with draw-ahead
The public integration branch combines this patch with boykopovar#6188 head
0eb0d8903b0b, at public head5880ec71fabda15131dca372b76e3bb2dc6d1965. Its private build head9d90044337436e8af5714ec9e14b00dc65bb9cabdiffers only by the teardown gitlink. The full Linux Release build and all 23 selected cache, image-table, draw-ahead, draw-cache, graphics and recorder tests pass on Radeon and Lavapipe (4.05 s each), zero skips. A native idle-scene pair is recorded below; interactive gameplay remains unverified. The earlier four-run Astro FPS report belongs to the draw-ahead-only revision.Native Astro pair
Astro PPSA21564
-lvl hub_crashsite, Ryzen 7950X / RX 6650 XT / RADV. The baseline is the latest boykopovar#6188 draw-ahead revision on maind92a8dadplus the common private teardown repair (a6a10e581f2c). The candidate adds only this cache-cleanup patch (9d9004433743). Both use pipeline 1, 4096 cache entries, the same compatible warmed shader cache, a 3072×1728 native window, no input, Firefox active during measurement, andAPS5_TRACE_SECONDS=300:60. Both completed the trace and 280/410-second captures of the same idle camera, with different idle poses. Both ended at the planned 425-second timeout (exit 124), restored the kernel limit, and logged no fatal shader or Vulkan error.The candidate is 6.25% faster in this one pair. Run-to-run variation, desktop GPU activity and idle phase remain uncontrolled, so this is not an established stable speed gain.
Memory medians from six samples per run during seconds 300–360 (MiB):
The candidate has about 216 MiB less median requested GPU allocation and 273 MiB less process RSS in this pair. Its 712 MiB lower resident VRAM is partly offset by 495 MiB higher resident GTT; the entire VRAM difference must not be described as freed allocation. These are the title's DRM-client figures, deduplicated by device and client ID, following the kernel accounting definitions. RSS and GPU totals overlap and must not be added together. A single pair does not establish a repeatable memory reduction.
Detailed CPU events overflowed around seven seconds into both traces; aggregate frame/GPU counters cover the measured minutes. Exact official summary lines, in execution order:
{"commit":"9d9004433743","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_TRACE_SECONDS":"300:60"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 300:60","first_present":2016,"ms":60142.989},"presents":281,"frame_ms":{"p50":202.826,"p90":261.436,"p99":320.966,"max":335.408},"gpu_busy_ms_per_present":171.800,"worker_busy_pct":{"queue worker 0x0":98.984,"queue worker 0x48":97.608,"queue worker 0x40":99.686,"queue worker 0x46":6.489},"top_phases_ms_per_frame":{"Driver.Packet":646.793,"Driver.Packet.memory_wait":390.260,"Driver.Packet.draw":116.171,"Driver.Draw":115.266,"Driver.Draw.draw_and_resource_release":87.851,"Graphics.Draw":85.667,"Driver.Packet.prepare_memory":80.283,"Graphics.Draw.draw_and_resource_release":72.847},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.293,"events_lost":1941126,"totals_full":false}},"trace":"aps5-trace-9d9004433743-1739042.json.gz"} {"commit":"a6a10e581f2c","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_TRACE_SECONDS":"300:60"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 300:60","first_present":2026,"ms":60035.594},"presents":264,"frame_ms":{"p50":220.380,"p90":272.110,"p99":336.107,"max":349.674},"gpu_busy_ms_per_present":175.225,"worker_busy_pct":{"queue worker 0x0":99.045,"queue worker 0x40":99.737,"queue worker 0x48":97.598,"queue worker 0x46":6.237},"top_phases_ms_per_frame":{"Driver.Packet":686.777,"Driver.Packet.memory_wait":411.372,"Driver.Packet.draw":124.984,"Driver.Draw":123.963,"Driver.Draw.draw_and_resource_release":93.573,"Graphics.Draw":91.328,"Driver.Packet.prepare_memory":87.734,"Graphics.Draw.draw_and_resource_release":77.177},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.983,"events_lost":1981713,"totals_full":false}},"trace":"aps5-trace-a6a10e581f2c-1905676.json.gz"}Checklist