Skip to content

Conversation

@rbqvq
Copy link
Contributor

@rbqvq rbqvq commented May 25, 2025

Description

This PR adds an arm64 build for Windows.

Todo:

  • Cross compile build-deps for arm

  • Some dependencies not available in clang-aarch64 environment

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Question

Should we need disable all x86 hardware accel (nvenc, intel quicksync and amdvce) on windows arm64 build?

@rbqvq

This comment was marked as resolved.

@rbqvq rbqvq force-pushed the master branch 4 times, most recently from 0ccee19 to 4039fec Compare May 25, 2025 10:23
@rbqvq
Copy link
Contributor Author

rbqvq commented Jun 2, 2025

Can we use this hardware encode? 🤔
obsproject/obs-studio#11993

@ReenigneArcher
Copy link
Member

I think MF encoder is already included with the FFmpeg build, so why not?

@rbqvq
Copy link
Contributor Author

rbqvq commented Jun 2, 2025

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 part is up to you. 🤪

@rbqvq

This comment was marked as resolved.

@rbqvq rbqvq force-pushed the master branch 11 times, most recently from 9d0c82c to b0e2234 Compare June 9, 2025 09:53
@rbqvq rbqvq force-pushed the master branch 2 times, most recently from 48376c4 to a3ee774 Compare June 30, 2025 05:21
@ReenigneArcher
Copy link
Member

ci has been refactored a bit, the windows build is now in a separate workflow. It's already setup for a matrix build so should be easy to adapt your changes.

rbqvq added a commit to rbqvq/Sunshine that referenced this pull request Jan 20, 2026
rbqvq added a commit to rbqvq/Sunshine that referenced this pull request Jan 20, 2026
@rbqvq
Copy link
Contributor Author

rbqvq commented Jan 20, 2026

Builds failed with

✗ Build failed in 258ms
error during build:
parseAsync is not a function
    at Module.setSource (file:///C:/a/Sunshine/Sunshine/node_modules/rollup/dist/es/shared/node-entry.js:17416:37)
    at ModuleLoader.addModuleSource (file:///C:/a/Sunshine/Sunshine/node_modules/rollup/dist/es/shared/node-entry.js:21493:26)

@ReenigneArcher ReenigneArcher added this to the windows-arm milestone Jan 20, 2026
@codecov
Copy link

codecov bot commented Jan 21, 2026

Bundle Report

Bundle size has no change ✅

option(BUILD_DOCS "Build documentation" ON)
option(BUILD_TESTS "Build tests" ON)

# CLANGARM64 does not have libatomic which used by googletest, disable it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open an issue here? https://github.com/google/googletest/issues

It seems like there's really only one place where atomic is used, maybe they can easily work around it when it's not available. https://github.com/search?q=repo%3Agoogle%2Fgoogletest%20atomic&type=code

Or we should use the gtest provided by msys2? https://github.com/msys2/MINGW-packages/tree/ab284e9ffd0590397c948f56ac889208464fb0dd/mingw-w64-gtest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, I think you can open a issue for it
:(

@ReenigneArcher
Copy link
Member

wix installer is working now, could you test it in combination with the arm build?

#3916

I still need to make a few tweaks to that PR though.

@rbqvq
Copy link
Contributor Author

rbqvq commented Feb 1, 2026

Wow, its a good news.

I will test it later.

rbqvq and others added 2 commits February 3, 2026 18:50
MinHook does not support arm64, add conditional check

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Steam Audio Driver unavailable on Windows Arm64, add check

Signed-off-by: Coia Prant <coiaprant@gmail.com>
@rbqvq rbqvq force-pushed the master branch 2 times, most recently from 52fb69c to 885b977 Compare February 3, 2026 18:52
rbqvq and others added 7 commits February 3, 2026 19:13
Use ::std:: fully qualified namespace in template functions to avoid
  ambiguity with clang namespace resolution.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: Ricky8955555 <rkmiao@duck.com>
Clang does not have libatomic which used by googletest, So disable it

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Add windows arm64 documents.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
nsis does not support arm64, so we cannot create an installer at this time

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Add missing 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.
…llup

- Add `@rollup/wasm-node` to devDependencies.
- Use npm overrides to force Rollup to use the WASM version.
- Fixes "Node-API symbol not loaded" and "parseAsync is not a function" errors specifically occurring in MSYS2 ClangARM64 environment.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
@rbqvq rbqvq marked this pull request as ready for review February 3, 2026 20:15
@rbqvq
Copy link
Contributor Author

rbqvq commented Feb 3, 2026

All thing done.

Pre-built portable can find at https://github.com/rbqvq/Sunshine/actions/runs/21646290004

Thanks all people who works on #3905 and #4521

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2026

@rbqvq rbqvq requested a review from cgutman February 3, 2026 20:29
@rbqvq
Copy link
Contributor Author

rbqvq commented Feb 3, 2026

I think we can provide only portable version for windows arm64 currently, installer will be delay.

OBS Studio also don't have a installer, only portable.

So I think its okay.

If you agree I will update markdown docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants