fix(vk): reap_cap's lambda returns uint64_t, so vk_vma.cpp compiles on Linux again #1941
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1941
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/reap-cap-linux"
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?
Summary
Main doesn't build on Linux, so no nightly has come out since nightly-632. #1914 added
reap_cap()ingpu/vk/vk_vma.cpp. Its lambda returns256ull << 20(unsigned long long) on one path andstd::clamp<uint64_t>(...)on the other. On Linuxuint64_tisunsigned long, and clang rejects a deduced lambda return type that differs between returns:(release run 43651, job
appimage). Windows passed because thereuint64_tisunsigned long long.The lambda now names its return type (
[]() -> uint64_t). Every value stays the same.Testing
Tested: not run in the game. It is a compile fix with no change to any value, and it was opened with
--forceat the maintainer's request so the nightly can resume. The PR's Linux CI build is the check that matters.Still to test: None. The Linux build is checked by CI on this PR.
Measurements
Nothing to measure: a compile fix, and the generated code is the same.
Risks
None. Every value is the same and nothing changes for players. A revert brings the build failure back.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (Not run on this PC; CI runs it.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
WIP: fix(vk): reap_cap's lambda returns uint64_t, so vk_vma.cpp compiles on Linux againto fix(vk): reap_cap's lambda returns uint64_t, so vk_vma.cpp compiles on Linux againRecommendation: Wait. The explicit return type fixes the reported Linux compiler error while preserving the reaper’s queue limits. Merge after the Linux builder and game-free checks pass on this head and the author records the required smoke-test result.
This restores the ability to build Longshot’s Vulkan renderer on Linux, which unblocks Linux installs and nightly packaging. The one-line change makes the lambda’s intended type explicit without adding code paths.
Does it help: Unproven on the PR head. Release run 43651’s appimage job reported the mismatched return types. The source change directly addresses that diagnostic, but a successful build of
95c41fbb23is still missing. No performance measurements are needed for this compile fix.Other systems: The Linux renderer build is affected regardless of GPU vendor, including on Steam Deck. Windows already used the same type for both returns. Static inspection shows the same budget query, 256 MiB fallback, and one-eighth allowance clamped to 128 MiB–1 GiB, with the same queue accounting, locks, compaction and resource lifetimes. Launcher UI, saves, audio and input are outside the changed path.
Switches: None added, changed or removed.
Reviewed:
95c41fbb23against87c0d7b4d6: Read gpu/vk/vk_vma.cpp in full, the full diff and commit, AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the Forgejo PR template and the repository’s fix-with-test guidance. No separate review checklist exists in the checkout. Read the relevant declarations and callers, reaper checks and CI configuration. Skimmed the supplied run 43651 excerpt. The full run log, external Tooling rules and live Forgejo status were unavailable in the offline checkout. No translations or generated files changed.; nothing run (a code review).Checked and fine:
Waiting on the author (a run, a measurement or a decision; no edit does it)
87c0d7b4d6for the return-type diagnostic and passing on head95c41fbb23, plus the full check results. The fixture compiles the changed code, but its success alone cannot establish that the whole renderer builds. Run the Linux AppImage workflow’s renderer build check against this head and record the result. That Forgejo workflow requires manual dispatch for a PR branch.Suggestions (the author may take or leave)
Testing: Static review and git diff --check only. No builds, tests or game runs were executed. The PR includes the base failure excerpt and has no recorded head results.
Overlaps and merge order: #1914 introduced reap_cap() and is already in the base. No competing change or merge-order dependency found in the checkout.
Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.