Explorar el Código

GPU Vulkan: Fix depth-only framebuffer leak

cosmonaut hace 11 meses
padre
commit
57f2577c65
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 3 - 0
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -2987,6 +2987,9 @@ static void VULKAN_INTERNAL_DestroyTexture(
         }
 
         if (texture->subresources[subresourceIndex].depthStencilView != VK_NULL_HANDLE) {
+            VULKAN_INTERNAL_RemoveFramebuffersContainingView(
+                renderer,
+                texture->subresources[subresourceIndex].depthStencilView);
             renderer->vkDestroyImageView(
                 renderer->logicalDevice,
                 texture->subresources[subresourceIndex].depthStencilView,