build(windows): add arm64 support#3905
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
0ccee19 to
4039fec
Compare
b158d6d to
283ab4c
Compare
|
Can we use this hardware encode? 🤔 |
|
I think MF encoder is already included with the FFmpeg build, so why not? |
Well, I didn't read the source code of sunshine. |
This comment was marked as resolved.
This comment was marked as resolved.
9d0c82c to
b0e2234
Compare
48376c4 to
a3ee774
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Add TOSTRING for ICON. Signed-off-by: Coia Prant <coiaprant@gmail.com>
Add vendor ID detection for Qualcomm Adreno GPUs: - 0x4D4F4351: "QCOM" in ASCII (reversed as little-endian) - 0x5143: Alternate Qualcomm vendor ID When a Qualcomm GPU is detected, only Media Foundation encoders (h264_mf, hevc_mf, av1_mf) are considered compatible, as Qualcomm doesn't support NVENC, AMF, or QSV encoder APIs.
Add Windows Media Foundation hardware encoder support for platforms that don't have NVENC, AMF, or QSV (primarily Qualcomm Snapdragon). Encoders added: - h264_mf: H.264 via Media Foundation - hevc_mf: HEVC via Media Foundation - av1_mf: AV1 via Media Foundation Configuration: - Uses D3D11VA hardware device for GPU texture input - CBR rate control with display_remoting scenario for streaming - Only supports SDR 4:2:0 8-bit (Qualcomm MF encoder limitation) - Fixed GOP size of 120 frames since MF doesn't support on-demand IDR The mediafoundation encoder is probed after quicksync and amdvce, serving as a fallback for ARM64 Windows devices.
CLANGARM64 cannot load @rollup/rollup-win32-arm64-msvc native version. Add npm overrides to force rollup to use the WASM version. Add a CI step to dump npm debug logs (always run) to aid troubleshooting install failures. Enable nvm_node for Debian 12 and 13 in scripts/linux_build.sh to allow Node installation via nvm on those distros. Signed-off-by: Coia Prant <coiaprant@gmail.com> Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Delete the `#warning` emitted for non-x64 architectures in src/platform/windows/audio.cpp. Update cmake/compile_definitions/windows.cmake to suppress specific GCC warnings when building for Windows ARM64. Add flags to SUNSHINE_COMPILE_OPTIONS for CMAKE_SYSTEM_PROCESSOR=ARM64 to silence warnings. - `-Wno-dll-attribute-on-redeclaration` for Boost - `-Wno-unknown-warning-option` for ViGEmClient - `-Wno-unused-variable` for Boost Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Replace variable-length arrays with std::vector in src/platform/windows/input.cpp and src/platform/windows/misc.cpp for safety and portability. Add <vector> includes, allocate wide-character buffer with std::vector<WCHAR> and pass wide.data() to MultiByteToWideChar, and replace WSABUF VLA with std::vector<WSABUF> and use .data() for msg.lpBuffers. These changes avoid non-standard VLAs and reduce stack-allocation risks. Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Drop the HMODULE dll = nullptr; declaration from src/nvenc/nvenc_d3d11_on_cuda.h. This removes an unused module handle field from the nvenc D3D11-on-CUDA wrapper to reduce unnecessary state. Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Add CI build for Windows ARM64. Signed-off-by: Coia Prant <coiaprant@gmail.com> Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Add windows arm64 documents. Signed-off-by: Coia Prant <coiaprant@gmail.com> Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
|
Thank you. Please no more force pushing. |
|
Thanks, I went back to sleep. |
Insert a 'Debug nsis' step into .github/workflows/ci-windows.yml that always runs and prints the NSISOutput.log using the msys2 shell. This captures NSIS installer build logs for troubleshooting; the step uses '|| true' to avoid failing the job. The step is placed before the existing 'Debug wix' step.
Make NSIS detailed logging conditional on the target architecture by adding NSIS_LOGSET_COMMAND (set to "LogSet on" only when CMAKE_SYSTEM_PROCESSOR matches AMD64) and using it in CPACK_NSIS_EXTRA_INSTALL_COMMANDS and CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS instead of always calling LogSet. Update docs/getting_started.md to note that the install.log under %PROGRAMFILES% is available on AMD64 only.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3905 +/- ##
=========================================
Coverage ? 14.11%
=========================================
Files ? 95
Lines ? 19859
Branches ? 9189
=========================================
Hits ? 2804
Misses ? 13523
Partials ? 3532
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@rbqvq unfortunately, now arm64 is failing in Debian/Ubuntu images. We don't build these for PRs because they take 3+ hours. Do you have some idea how we can conditionally use these additions to the package.json? "@rollup/wasm-node": "4.57.1"
},
"overrides": {
"rollup": "npm:@rollup/wasm-node@4.57.1" |
|
I think we can provide two package.json and use script to rename them. |
|
Can we have a second package.json that depends on the first one? And use second one only when we need the override? If we can reduce the duplication that would be ideal. |
|
Or we can build them on a unified CI, and the CI of each OS builder only needs to pull the static resources that have been built. |
|
@ReenigneArcher It should be fix in #4687 Actions for windows build still working: |
|
Any idea why dxgi.exe would be flagged for arm64? dxgi-info.exe: https://www.virustotal.com/gui/file/65c17513dd24e3e846be1ab518f99c2933cd795985763847d80d46f9be8fa0ec/detection |



Description
This PR adds an arm64 build for Windows.
Issues Fixed or Closed
Type of Change
.github/...)Checklist