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

metal: Fix inverted return value in METAL_QueryFence

SDL_QueryGPUFence is documented to return true when the fence is signaled (complete). Since 514b26e it returns METAL_INTERNAL_IsFenceBusy directly, so it returns true when the fence is still busy, breaking usage of SDL_AcquireGPUSwapchainTexture.
xentripetal 1 месяц назад
Родитель
Сommit
b340ddcd7b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/gpu/metal/SDL_gpu_metal.m

+ 1 - 1
src/gpu/metal/SDL_gpu_metal.m

@@ -3633,7 +3633,7 @@ static bool METAL_QueryFence(
     SDL_GPUFence *fence)
     SDL_GPUFence *fence)
 {
 {
     MetalFence *metalFence = (MetalFence *)fence;
     MetalFence *metalFence = (MetalFence *)fence;
-    return METAL_INTERNAL_IsFenceBusy(metalFence);
+    return !METAL_INTERNAL_IsFenceBusy(metalFence);
 }
 }
 
 
 // Window and Swapchain Management
 // Window and Swapchain Management