Skip to content

Commit

Permalink
Fix incorrect DriverType
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed May 7, 2024
1 parent 14a5083 commit 003e2d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/GpuInterop/VulkanDemo/D3DMemoryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace GpuInterop.VulkanDemo;

public class D3DMemoryHelper
{
public static ID3D11Device? CreateDeviceByLuid(Span<byte> luid)
public static ID3D11Device CreateDeviceByLuid(Span<byte> luid)
{
DXGI.CreateDXGIFactory1<IDXGIFactory1>(out var factory).CheckError();
var longLuid = MemoryMarshal.Cast<byte, long>(luid)[0];
Expand All @@ -21,14 +21,14 @@ public class D3DMemoryHelper
if (adapter.Description1.Luid != longLuid)
continue;

D3D11.D3D11CreateDevice(adapter, DriverType.Hardware, DeviceCreationFlags.None,
D3D11.D3D11CreateDevice(adapter, DriverType.Unknown, DeviceCreationFlags.None,
[
FeatureLevel.Level_12_1, FeatureLevel.Level_12_0, FeatureLevel.Level_11_1,
FeatureLevel.Level_11_0, FeatureLevel.Level_10_0, FeatureLevel.Level_9_3,
FeatureLevel.Level_9_2, FeatureLevel.Level_9_1,
],
out var device);
return device;
out var device).CheckError();
return device!;
}
finally
{
Expand Down

0 comments on commit 003e2d5

Please sign in to comment.