From 76f8705c1243640c7933f05fddf75f3e16fd7dff Mon Sep 17 00:00:00 2001 From: Evan Hemsley <2342303+thatcosmonaut@users.noreply.github.com> Date: Mon, 11 May 2026 11:42:11 -0700 Subject: [PATCH] GPU: Fix segfault when copying to Vulkan swapchain (#15543) --- src/gpu/vulkan/SDL_gpu_vulkan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c index b366f7211f..56074c96ad 100644 --- a/src/gpu/vulkan/SDL_gpu_vulkan.c +++ b/src/gpu/vulkan/SDL_gpu_vulkan.c @@ -2500,6 +2500,11 @@ static void VULKAN_INTERNAL_TrackTextureTransfer( VulkanCommandBuffer *commandBuffer, VulkanTexture *texture) { + // Textures not managed by our allocator (i.e. the swapchain) don't need to be refcounted. + if (texture->usedRegion == NULL) { + return; + } + TRACK_RESOURCE( texture, VulkanTexture *,