mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 20:09:38 +08:00
GPU: Fix Vulkan backend segfault
This commit is contained in:
@@ -10589,7 +10589,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
|||||||
commandBuffer->usedBufferCount = 0;
|
commandBuffer->usedBufferCount = 0;
|
||||||
|
|
||||||
for (Sint32 i = 0; i < commandBuffer->buffersUsedInPendingTransfersCount; i += 1) {
|
for (Sint32 i = 0; i < commandBuffer->buffersUsedInPendingTransfersCount; i += 1) {
|
||||||
(void)SDL_AtomicDecRef(&commandBuffer->usedBuffers[i]->usedRegion->allocation->referenceCount);
|
(void)SDL_AtomicDecRef(&commandBuffer->buffersUsedInPendingTransfers[i]->usedRegion->allocation->referenceCount);
|
||||||
}
|
}
|
||||||
commandBuffer->buffersUsedInPendingTransfersCount = 0;
|
commandBuffer->buffersUsedInPendingTransfersCount = 0;
|
||||||
|
|
||||||
@@ -10599,7 +10599,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
|||||||
commandBuffer->usedTextureCount = 0;
|
commandBuffer->usedTextureCount = 0;
|
||||||
|
|
||||||
for (Sint32 i = 0; i < commandBuffer->texturesUsedInPendingTransfersCount; i += 1){
|
for (Sint32 i = 0; i < commandBuffer->texturesUsedInPendingTransfersCount; i += 1){
|
||||||
(void)SDL_AtomicDecRef(&commandBuffer->usedTextures[i]->usedRegion->allocation->referenceCount);
|
(void)SDL_AtomicDecRef(&commandBuffer->texturesUsedInPendingTransfers[i]->usedRegion->allocation->referenceCount);
|
||||||
}
|
}
|
||||||
commandBuffer->texturesUsedInPendingTransfersCount = 0;
|
commandBuffer->texturesUsedInPendingTransfersCount = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user