gamescope: add stb_image_resize2 compatibility patch#506565
Merged
Merged
Conversation
b20f845 to
750d8bf
Compare
Contributor
|
Has this been proposed upstream? |
Contributor
Author
@K900 no I haven't, I can try that first? |
750d8bf to
f451753
Compare
Contributor
Author
@K900 I've opened ValveSoftware/gamescope#2130 to add this to the upstream repo and have updated the patch in this PR to reference it in the mean time. |
Pulls in a pending upstream patch (ValveSoftware/gamescope#2130) that supports both the old stb_image_resize.h and the new stb_image_resize2.h using __has_include for compile-time detection. This prepares gamescope for the upcoming stb update (NixOS#491159) which removes stb_image_resize.h in favor of stb_image_resize2.h. Tested against both old stb (0-unstable-2023-01-29) and new stb (0-unstable-2025-10-25) on x86_64-linux and aarch64-linux. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Contributor
|
f451753 to
331fc30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pulls in a pending upstream patch (ValveSoftware/gamescope#2130) that supports both
stb_image_resize.h(old) andstb_image_resize2.h(new) using__has_includefor compile-time detection. This prepares gamescope for the stb update in #491159, which removes the deprecatedstb_image_resize.h.The patch is a no-op with the current stb version and will activate the new code path once stb is updated. By landing this compatibility patch first, the stb update becomes safe for gamescope.
CuraEngine was also flagged in #491159 but does not use
stb_image_resize.h— it only usesstb_image.hwhose API is unchanged. Its current build failure is a pre-existing issue inlibarcus(protobuf type mismatch), reproducible on master without any stb changes.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Test details
Tested against both old and new stb on x86_64-linux and aarch64-linux:
0-unstable-2023-01-29, current master):#elsecode path exercised, build succeeds on both platforms0-unstable-2025-10-25, from stb: 0-unstable-2023-01-29 -> 0-unstable-2025-10-26 #491159):#if __has_includecode path exercised viagamescope.override { stb = stb-new; }, build succeeds on both platformsplatforms = lib.platforms.linux), so x86_64-darwin and aarch64-darwin are N/A