Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit a7682ef

Browse files
committed
Add some better CheckFeatureSupport helpers.
1 parent e5ab44d commit a7682ef

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Source/SharpDX.Direct3D12/Device.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,26 @@ public unsafe FeatureDataArchitecture Architecture
565565
}
566566
}
567567

568+
public unsafe FeatureDataGpuVirtualAddressSupport GpuVirtualAddressSupport
569+
{
570+
get
571+
{
572+
FeatureDataGpuVirtualAddressSupport options = new FeatureDataGpuVirtualAddressSupport();
573+
this.CheckFeatureSupport(Feature.GpuVirtualAddressSupport, new IntPtr(&options), Utilities.SizeOf<FeatureDataGpuVirtualAddressSupport>());
574+
return options;
575+
}
576+
}
577+
578+
public unsafe FeatureDataShaderModel ShaderModel
579+
{
580+
get
581+
{
582+
FeatureDataShaderModel options = new FeatureDataShaderModel();
583+
this.CheckFeatureSupport(Feature.ShaderModel, new IntPtr(&options), Utilities.SizeOf<FeatureDataShaderModel>());
584+
return options;
585+
}
586+
}
587+
568588
private static void CreateDevice(Adapter adapter, FeatureLevel minFeatureLevel, Device instance)
569589
{
570590
D3D12.CreateDevice(adapter, minFeatureLevel, Utilities.GetGuidFromType(typeof(Device)), instance).CheckError();

0 commit comments

Comments
 (0)