From b79a5e27ffa9ada1f1f8d1d0cef1587e44fdef42 Mon Sep 17 00:00:00 2001 From: xentripetal Date: Fri, 7 Aug 2026 22:04:35 -0500 Subject: [PATCH] metal: Fix inverted return value in METAL_QueryFence SDL_QueryGPUFence is documented to return true when the fence is signaled (complete). Since 514b26e it returns METAL_INTERNAL_IsFenceBusy directly, so it returns true when the fence is still busy, breaking usage of SDL_AcquireGPUSwapchainTexture. (cherry picked from commit b340ddcd7b44511f7b49005ba4a91a3c9907f77e) --- src/gpu/metal/SDL_gpu_metal.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpu/metal/SDL_gpu_metal.m b/src/gpu/metal/SDL_gpu_metal.m index 3750ffa471..3a02f8fd3a 100644 --- a/src/gpu/metal/SDL_gpu_metal.m +++ b/src/gpu/metal/SDL_gpu_metal.m @@ -3627,7 +3627,7 @@ static bool METAL_QueryFence( SDL_GPUFence *fence) { MetalFence *metalFence = (MetalFence *)fence; - return METAL_INTERNAL_IsFenceBusy(metalFence); + return !METAL_INTERNAL_IsFenceBusy(metalFence); } // Window and Swapchain Management