fix(vk): the Intel texture budget's caps build on Linux #2629

Open
notquiteog wants to merge 1 commit from notquiteog/fix/linux-igpu-budget-types into main
notquiteog commented 2026-11-12 03:29:22 +00:00 (Migrated from github.com)

main does not build on Linux since #2603: the Vulkan back end stops at gpu/vk/vk_texture.cpp with "no matching function for call to 'min'" (and 'max'), eight times.

Why: uint64_t is unsigned long on Linux, and the caps (1536ull << 20, ...) are unsigned long long, so std::min(budget, 2048ull << 20) has no overload that takes both. On Windows the two are the same type, which is why it built there.

What changed: the eight calls name their type (std::min<uint64_t>, std::max<uint64_t>). No value changes.

Tested: nx2/build.py --standalone with RX_VK_ONLY=1 (clang 22, Linux x86-64) fails before and builds after; the whole game then builds and links with #2617's missing function put back (the other pull request).

🤖 Generated with Claude Code

`main` does not build on Linux since #2603: the Vulkan back end stops at `gpu/vk/vk_texture.cpp` with "no matching function for call to 'min'" (and 'max'), eight times. **Why:** `uint64_t` is `unsigned long` on Linux, and the caps (`1536ull << 20`, ...) are `unsigned long long`, so `std::min(budget, 2048ull << 20)` has no overload that takes both. On Windows the two are the same type, which is why it built there. **What changed:** the eight calls name their type (`std::min<uint64_t>`, `std::max<uint64_t>`). No value changes. **Tested:** `nx2/build.py --standalone` with `RX_VK_ONLY=1` (clang 22, Linux x86-64) fails before and builds after; the whole game then builds and links with #2617's missing function put back (the other pull request). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Owner

@Joey-Magnus reviewed on GitHub · 2026-11-12 14:33 UTC · original

Thanks for tracking this down. The same fix is already on main. #2634 (85a6dde3, "fix(build): the iGPU texture budget's caps build on Linux") changed the RAM caps in texture_frame to std::min<uint64_t> and std::max<uint64_t>, in gpu/vk/vk_texture.cpp around lines 4212-4225. That's why this PR now conflicts.
I checked main: every cap and the 1 GB floor use the explicit type. The last line, std::min(budget, driver_budget), compares two uint64_t values and builds as it is. The Linux AppImage job on main builds the Vulkan back end again, so nothing is left for this PR to fix.
I'd suggest closing it as superseded by #2634. If you saw another mixed-type std::min or std::max that still fails on Linux or with clang, please open a new PR against current main for just that line.

> [@Joey-Magnus](https://github.com/Joey-Magnus) reviewed on GitHub · 2026-11-12 14:33 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2629#pullrequestreview-5876224701) Thanks for tracking this down. The same fix is already on main. #2634 (85a6dde3, "fix(build): the iGPU texture budget's caps build on Linux") changed the RAM caps in texture_frame to std::min<uint64_t> and std::max<uint64_t>, in gpu/vk/vk_texture.cpp around lines 4212-4225. That's why this PR now conflicts. I checked main: every cap and the 1 GB floor use the explicit type. The last line, std::min(budget, driver_budget), compares two uint64_t values and builds as it is. The Linux AppImage job on main builds the Vulkan back end again, so nothing is left for this PR to fix. I'd suggest closing it as superseded by #2634. If you saw another mixed-type std::min or std::max that still fails on Linux or with clang, please open a new PR against current main for just that line. <!-- github-sync:r:5876224701 -->
Commenting is not possible because the repository is archived.
No description provided.