@@ -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 *,