Browse Source

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.
pull/17443/head
Matt Heimlich 1 year ago
committed by GitHub
parent
commit
9cecb90ba1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      samples/GpuInterop/VulkanDemo/D3DMemoryHelper.cs

2
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;

Loading…
Cancel
Save