#6012
fix(linux): guard wlroots Vulkan calls in builds without Vulkan
Description
Building Wayland capture with SUNSHINE_ENABLE_VULKAN=OFF fails to link because wlr_vram_t still references vk::make_avcodec_encode_device_vram and vk::get_supported_capture_modifiers. Guard both references with SUNSHINE_BUILD_VULKAN, matching the adjacent CUDA and VA-API guards. The Vulkan-enabled code remains unchanged.
Screenshot
Issues Fixed or Closed
Found while building a local fix for the TLS shutdown hang tracked in #5617; this build fix is independent.
Roadmap Issues
Testing
- Reproduced both unresolved Vulkan symbol errors with Wayland enabled and Vulkan disabled.
- After the guards, configured and linked both
sunshineandtest_sunshinenatively on Linux aarch64 with-DSUNSHINE_ENABLE_WAYLAND=ON -DSUNSHINE_ENABLE_VULKAN=OFF. - Started the resulting binary on Hyprland and verified Wayland monitor discovery, H.264 encoder discovery, HTTPS responses, and the authenticated web UI.
- 88 focused HTTPS, pairing, authorization, network, codec-advertisement, and RTSP tests passed.
- Ran the project clang-format command and
git diff --check. - This is a disabled-feature compile/link regression; validation uses the affected native build configuration rather than a runtime unit test for unavailable Vulkan functionality. A Vulkan-enabled build was not run.
Type of Change
- feat: New feature (non-breaking change which adds functionality)
- fix: Bug fix (non-breaking change which fixes an issue)
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
- refactor: Code change that neither fixes a bug nor adds a feature
- perf: Code change that improves performance
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to CI configuration files and scripts
- chore: Other changes that don't modify src or test files
- revert: Reverts a previous commit
- BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)
Checklist
- Code follows the style guidelines of this project
- Code has been self-reviewed
- Code has been commented, particularly in hard-to-understand areas
- Code docstring/documentation-blocks for new or existing methods/components have been added or updated
- Tests have been added or updated for new or modified functionality, including regression tests for bug fixes
AI Usage
See our AI usage policy.
- AI tools were used while preparing this PR
Prepared by Codex (GPT-6; reasoning effort is not exposed by this session).
Activity
4copilot-pull-request-reviewer[bot]reviewed1d ago
Prepared by Codex (GPT-6; reasoning effort is not exposed by this session).
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.