build(videoout): link one SDL copy on macOS #11119
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11119"
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 Betr0x on 2026-10-25T18:39:32Z.
What
Follow-up to #11049, which @imellag asked me to open there. On macOS the Objective-C runtime registers SDL's classes from every copy in the process.
libSceVideoOutlinked its ownSDL2-staticnext tolibSceAgcDriver's, so every relinked title printed 14Class SDL_... is implemented in both .../libSceAgcDriver.prx and .../libSceVideoOut.prxwarnings, which the runtime says "may cause spurious casting failures and mysterious crashes".On Apple,
libSceVideoOutnow takes SDL fromlibSceAgcDriver, which it already links, the same way #11049 does forlibSceAudioInandlibSceAudioOut. The test executables that link bothlibSceVideoOutand their ownSDL2-static(video_out_mouse_tests,pad_sdl_tests,video_out_hdr_probe_tests,video_out_telemetry_tests) follow: without that,pad_sdlaborts, because it attaches its virtual joysticks in its own SDL copy while VideoOut askslibSceAgcDriver's.pad_sdl_testsgets${ANYPS5_SDL2_INCLUDE_DIR}, which it used to receive throughSDL2-static.On Linux and Windows
videoOutSdlisSDL2-static, so every link line is the same as before.Tested
Apple M4 (10-core GPU), macOS 27.0.1, Apple clang 21, x86-64 Release under Rosetta 2 (
-DCMAKE_OSX_ARCHITECTURES=x86_64, Ninja,BUILD_TESTING=ON), MoltenVK 1.4.2 from the LunarG SDK 1.4.363.0.maindoes not build the libraries on macOS by itself, so the tree ismain3a2c51afdmerged with mugurc'sci/macos-series-2(which carries #11049's change as63db337cd8), #10885 and #10540. Both states below are the same tree, withcore/libs/prx/libSceVideoOut/CMakeLists.txtas onmainand as in this PR.mainlibSceVideoOut.prxlibSceAgcDrivervideo_out_mouse_testspad_sdl,video_out_telemetry*,video_out_hdr_probeoutputctest -R "video_out|audio|pad|mouse|keyboard"Both titles were relinked with
--macos --to-rosettaand driven throughAPS5_PAD_INPUT_FILE: Syobon Action reaches level 1 and moves, DriftCheck shows both sticks, L1+R1 and Triangle, in both states.Validation, as CONTRIBUTING asks for VideoOut changes (
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1):ctest -R "video_out|pad_sdl" -V: 32/32 pass in both states, nowas not found but was requested by env var VK_INSTANCE_LAYERS, noVUID-. This says little on macOS: every VideoOut test that creates a Vulkan device skips there (Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen)), and withVK_LOADER_DEBUG=layernone of the 32 inserts the layer.VK_LOADER_DEBUG=layerthe loader insertsVK_LAYER_KHRONOS_validationin every run; both titles log noVUID-onmainand with this PR, and dump the same number of frames (8 each).Linux and Windows: not built here; on both
videoOutSdlexpands toSDL2-static.python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.pycould not comparecore/libs/prx/libSceVideoOut/CMakeLists.txtwith #674, #5021, #7201 and #8927, which conflict withmain. Of those, #674 changes the sametarget_link_libraries(libSceVideoOut ...)line, for its input editor; none of them changes how VideoOut gets SDL on macOS. The two were combined by hand: no merge order is needed, and whichever lands second puts #674'sanyps5_input_editor anyps5_inputin front of the current line and keeps${videoOutSdl}in place ofSDL2-static(details in the review reply; #674 also needs a rebase onto currentmainfor other files).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
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T18:41:57Z.
Review: CHANGES_REQUESTED
The macOS SDL de-duplication approach and the reported measurements are clear. The repository overlap check could not compare this file against #674, and the PR description confirms that #674 changes the same
target_link_libraries(libSceVideoOut ...)line. The current checklist declares only #11049 as a dependency. Please coordinate the merge order with #674’s author and add aDepends on: #674entry if the line-level conflict requires an order; otherwise record that both changes were manually combined cleanly. This is the remaining workflow blocker I found.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T18:50:53Z.
Review: APPROVED
The author has now recorded a concrete manual resolution for the shared link line and notified #674’s author. I checked the current diff: Apple links the VideoOut and affected test targets through
libSceAgcDriver, while Linux and Windows retainSDL2-static; the input libraries from #674 can be retained alongside this${videoOutSdl}selection as shown in the follow-up. The reported Apple test/title runs and validation results cover the changed platform path. The earlier overlap coordination point is addressed; the remaining large rebase conflicts on #674 are separate from this PR.Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-26T19:17:53Z.
Review: COMMENTED
Reviewed
572fa398d8e3a7a542b2ad6c02036db8b118515d. Pending review.The VideoOut link selection is checked; native Apple verification and upstream Build authorization remain pending.
Validation: Actual submitted CMake selects libSceAgcDriver for the changed Darwin library/test links and SDL2-static on Linux/Windows; the extra pad_sdl include directory is retained. These branch checks are not macOS links or controller execution.
Scope / next step: The author reports combined-series macOS testing, which I have not independently rerun. Complete the authorized hosted Build and retain native Apple SDL/VideoOut evidence before final approval.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T07:06:10Z.
Review: COMMENTED
Ran head
572fa398don a second Apple Silicon machine, both on its own and together with #11049.Machine: Apple M2 Max (32 GB), macOS 27.2 (26B5112a), Apple clang 21.0.0, x86_64 Release under Rosetta 2 (
-DCMAKE_OSX_ARCHITECTURES=x86_64, Ninja,BUILD_TESTING=ON, Python 3.9 from Xcode).Base:
mainb986c11a34does not build the libraries on macOS by itself, so the tree is thatmainplus the open macOS build PRs (#10366, #7631, #10659, #10660, #11249, #11358, #10669, #10552, #7804, #10676, #11447, #11437) and #11554, plus #11705 (applied locally). Only this PR is toggled, withgit merge --no-commiton top.Copies of SDL in the built
.prxfiles: Objective-CSDL*classes, plusSDL_symbols defined and imported. The warnings come from a small x86_64 program thatdlopenslibSceAgcDriver,libSceVideoOut,libSceAudioInandlibSceAudioOutand countsis implemented in both:libSceVideoOut.prxlibSceAudioIn/libSceAudioOutvideo_out_mouse+pad_sdloutput (ctest -V)pad_sdlandvideo_out_mousepass 3/3 with this PR.ctest -R "audio|pad|mouse|keyboard|sdl"passes 71/71, alone and together with #11049. I left out the video_out flip, HDR-probe and telemetry tests, which open windows.ctest -R audio51/51, 3/3.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T04:24:30Z.
Review: COMMENTED
Reviewed
f92e5b7c3ed4dfdc949da3fcb29709ef20eca35f— comment; validation/readiness remains incomplete.The updated CMake retains the intended Apple SDL selection, including the newly affected HDR-probe and telemetry links. Native Apple verification remains outside my available environment.
Executed the submitted CMake conditionals with target-command recording for Darwin, Linux and Windows: all five affected targets use libSceAgcDriver for the selected Apple SDL dependency and retain SDL2-static elsewhere. The corresponding author-base branches were checked too. This evaluates real CMake control flow, but does not link Mach-O libraries, load Objective-C classes or run pad/VideoOut tests. The author’s combined-series macOS and validation-layer results remain author evidence; I did not independently rerun them. No new production defect found.