Procházet zdrojové kódy

GPU: Fix Vulkan backend segfault

(cherry picked from commit f8b7e22d7d1d143f085a1b355e674b05025ef114)
cosmonaut před 2 dny
rodič
revize
543b8b9b12
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/gpu/vulkan/SDL_gpu_vulkan.c

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

@@ -10540,7 +10540,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;
 
@@ -10550,7 +10550,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;