Просмотр исходного кода

GPU: Fix Vulkan backend segfault

cosmonaut 1 день назад
Родитель
Сommit
f8b7e22d7d
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 2 - 2
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -10589,7 +10589,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
     commandBuffer->usedBufferCount = 0;
 
     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;
 
@@ -10599,7 +10599,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
     commandBuffer->usedTextureCount = 0;
 
     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;