Kaynağa Gözat

Fix adapter selection in Vulkan demo (#17442)

Changed the adapter index in the for loop to correctly iterate through available adapters. This ensures that the correct adapter is selected based on its Luid.
Matt Heimlich 1 yıl önce
ebeveyn
işleme
9cecb90ba1

+ 1 - 1
samples/GpuInterop/VulkanDemo/D3DMemoryHelper.cs

@@ -17,7 +17,7 @@ public class D3DMemoryHelper
         var longLuid = MemoryMarshal.Cast<byte, long>(luid)[0];
         for (var c = 0; c < factory.GetAdapterCount1(); c++)
         {
-            using var adapter = factory.GetAdapter1(0);
+            using var adapter = factory.GetAdapter1(c);
             if (adapter.Description1.Luid != longLuid)
                 continue;