Repository navigation
fix(agc): retain shader memory region vectors - #7759
adriadam10 merged 1 commit into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Manual follow-up to the overlap report: I reviewed the flagged |
|
Independent validation of exact head
Source review: the reused store lambda uses a local request copy, so the outer request does not inherit its temporary region view. The image-table helper retains ASan limitation: I cannot claim a sanitizer pass. A separate ASan run on unmodified main Update: #7781 has since merged the fixture nothrow-allocation correction for #7765. The pinned sanitizer runs above predate it; we have not yet rerun the full combined fixture under ASan on that newer source. Thanks for taking #7754 forward, including the additional image-table helper. Our one-file prototype remains preserved on the fork; we will use this PR rather than submit a duplicate. AI-assisted review/report: yes, Codex. No workflow dispatch or merge performed. |
|
Intel and AMD Windows data: the 16 tests this PR touches pass on an Intel UHD 770 and an AMD RX 9070 XT, with and without the change. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
So on these two GPUs the tests don't distinguish the change, and they show no regression. AI-assisted: yes (Claude Code) |
jotitadev
left a comment
There was a problem hiding this comment.
macOS data point: Apple clang already flags these sites in a default build, so this shows up as compiler warnings on macOS. On the tree below without this PR, the build has 20 -Wdangling-assignment-gsl warnings in tests/ShaderMemory.cpp and 1 in tests/execution/ImageTableCache.cpp (object backing the pointer 'request.context.memory' will be destroyed at the end of the full-expression). These are the 20 + 1 sites this PR changes. With the PR there are none, and both tests pass.
Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704. Head 55a3eeb, PR diff applied cleanly. Apple clang 21.0.0, Release, default warnings, no extra flags.
Tested: the tree is main a373e85 + mugurc's macOS series (ci/macos-series-2) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain main (it doesn't build on macOS yet). Applied together in the same build: #7371, #7535, #7684, #7746 and #7759, plus a test-only patch that lets nine AGC fixtures load the Vulkan loader on macOS (branch jotitadev:fix/agc-tests-vulkan-loader-macos). Base on that tree: 40 ^agc failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, plus agc_driver_pooled_buffer_range and agc_performance_overlay, which only run because of the loader patch.
agc_shader_memoryandagc_driver_image_table_cachepass 3 of 3 on both drivers with the PR. #7684's newShaderMemory.cppcases were in the same build and add no new warnings.- The full
^agcsuite with the stack has the base failures on both drivers. The only new failure,agc_driver_native_depth_clears, comes from #7371 / #7233. Nothing from this PR.
GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Thank you for the cross-platform checks. The Windows and Linux CPU fixture runs, static-analysis results, and AMD/Intel Windows runs show no regression in the tested cases. The 16 Windows tests pass both with and without the change, so those GPU results do not distinguish the fix; the independent 20 fresh-process CPU passes and the compiler warning results provide additional validation for the lifetime issue. I’ll describe those separately rather than treating them as GPU proof. |
|
Rechecked against current main: no temporary |
What
Retain the vectors returned by
ShaderMemory::Regions()anywhere test requests store them inGuestContext::memory, which is a borrowed span. Fixes all 20 reported sites inShaderMemory.cpp, including reused request/lambda cases, and the same lifetime bug in theImageTableCachecapture helper. The store lambda now compiles a local request copy so an outer request cannot retain a view into a destroyed vector.Tested
python3 tools/check_conventions.py --base upstream/main,python3 tools/pr_overlap.py --branch codex/fix-shader-memory-region-lifetimes --base main --repo boykopovar/AnyPS5, andgit diff --checkpass. No open PR overlap was found.The focused Linux test build was not completed. The available
agc_shader_memory_testsbuild tree is based on an older branch; compiling the current-main test source against it fails on unrelatedSpirvTarget::float32FlushToZerofields absent from that older branch. The temporary source copies were restored immediately. No test pass is claimed.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