public static bool IsSupported(IUnknown adapter, FeatureLevel minFeatureLevel = FeatureLevel.Level_11_0) { var result = D3D12Internal.CreateDevice( adapter, minFeatureLevel, typeof(ID3D12Device).GUID, out var nativePtr); return(result.Success); }
public static Result D3D12CreateDevice(IUnknown adapter, FeatureLevel minFeatureLevel, out ID3D12Device device) { var result = D3D12Internal.CreateDevice(adapter, minFeatureLevel, typeof(ID3D12Device).GUID, out var nativePtr); if (result.Failure) { device = null; return(result); } device = new ID3D12Device(nativePtr); return(result); }
/// <summary> /// Test to create <see cref="ID3D12Device"/> without actually creating it. /// </summary> /// <param name="adapter"></param> /// <param name="minFeatureLevel"></param> /// <returns></returns> public static Result D3D12CreateDevice(IUnknown adapter, FeatureLevel minFeatureLevel) { return(D3D12Internal.CreateDevice(adapter, minFeatureLevel, typeof(ID3D12Device).GUID, out var nativePtr)); }