mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 10:57:40 +00:00
Vulkan Renderer - closes #9385. When the vertex buffer size is exceeded, make sure to wait for outstanding work before resizing it. This fixes validation errors/crash found with using Imgui SDL3 renderer on Vulkan.
This commit is contained in:
parent
3448273be1
commit
650ba8f3ec
1 changed files with 2 additions and 0 deletions
|
@ -3146,6 +3146,8 @@ static SDL_bool VULKAN_UpdateVertexBuffer(SDL_Renderer *renderer,
|
|||
}
|
||||
/* If the existing vertex buffer isn't big enough, we need to recreate a big enough one */
|
||||
if (dataSizeInBytes > rendererData->vertexBuffers[vbidx].size) {
|
||||
VULKAN_IssueBatch(rendererData);
|
||||
VULKAN_WaitForGPU(rendererData);
|
||||
VULKAN_CreateVertexBuffer(rendererData, vbidx, dataSizeInBytes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue