mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-10-02 16:23:57 +08:00
If VULKAN_Submit fails during VULKAN_INTERNAL_CreateTexture, destroy the texture and return NULL
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
(cherry picked from commit 9479ac039c)
This commit is contained in:
committed by
Sam Lantinga
parent
92570af7d3
commit
36b306a36c
@@ -5893,7 +5893,10 @@ static VulkanTexture *VULKAN_INTERNAL_CreateTexture(
|
||||
VULKAN_TEXTURE_USAGE_MODE_UNINITIALIZED,
|
||||
texture);
|
||||
VULKAN_INTERNAL_TrackTexture(barrierCommandBuffer, texture);
|
||||
VULKAN_Submit((SDL_GPUCommandBuffer *)barrierCommandBuffer);
|
||||
if (!VULKAN_Submit((SDL_GPUCommandBuffer *)barrierCommandBuffer)) {
|
||||
VULKAN_INTERNAL_DestroyTexture(renderer, texture);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return texture;
|
||||
|
||||
Reference in New Issue
Block a user