mirror of https://github.com/libsdl-org/SDL.git
Fix #12142 - the problem was if the size of the vertex buffer was exceeded, the currentVertexBuffer would be reset to zero and thus we'd leave it pointing to an in-use VB that would get overwritten on the next present before the vkQueueSubmit occurred.
This commit is contained in:
parent
f6126e9ea1
commit
4fd0b2a85c
|
|
@ -3253,7 +3253,7 @@ static bool VULKAN_UpdateVertexBuffer(SDL_Renderer *renderer,
|
|||
|
||||
stateCache->vertexBuffer = vertexBuffer->buffer;
|
||||
|
||||
rendererData->currentVertexBuffer++;
|
||||
rendererData->currentVertexBuffer = vbidx + 1;
|
||||
if (rendererData->currentVertexBuffer >= SDL_VULKAN_NUM_VERTEX_BUFFERS) {
|
||||
rendererData->currentVertexBuffer = 0;
|
||||
rendererData->issueBatch = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue