diff --git a/src/ComputeSharp.Graphics/Commands/CommandList.cs b/src/ComputeSharp.Graphics/Commands/CommandList.cs index 6f288bce..5de7d30f 100644 --- a/src/ComputeSharp.Graphics/Commands/CommandList.cs +++ b/src/ComputeSharp.Graphics/Commands/CommandList.cs @@ -21,7 +21,7 @@ namespace ComputeSharp.Graphics.Commands CommandListType.Direct => GraphicsDevice.DirectAllocatorPool.GetCommandAllocator(), _ => throw new NotSupportedException($"Unsupported command list type with value {CommandListType}") }; - NativeCommandList = GraphicsDevice.NativeDevice.CreateCommandList(CommandListType, CommandAllocator, null); + NativeCommandList = GraphicsDevice.NativeDevice.CreateCommandList(0, CommandListType, CommandAllocator, null); // Set the heap descriptor if the command list is not for copy operations if (CommandListType != CommandListType.Copy) diff --git a/src/ComputeSharp.Graphics/Commands/PipelineState.cs b/src/ComputeSharp.Graphics/Commands/PipelineState.cs index cdf5ae86..a7323687 100644 --- a/src/ComputeSharp.Graphics/Commands/PipelineState.cs +++ b/src/ComputeSharp.Graphics/Commands/PipelineState.cs @@ -18,7 +18,7 @@ namespace ComputeSharp.Graphics.Commands RootSignature = rootSignature; ComputeShader = computeShader; - NativePipelineState = device.NativeDevice.CreateComputePipelineState(this); + NativePipelineState = device.NativeDevice.CreateComputePipelineState(this); } /// diff --git a/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj b/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj index eb97cc79..c8324bc6 100644 --- a/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj +++ b/src/ComputeSharp.Graphics/ComputeSharp.Graphics.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/ComputeSharp.Graphics/GraphicsDevice.cs b/src/ComputeSharp.Graphics/GraphicsDevice.cs index 9a5165b6..de7b488b 100644 --- a/src/ComputeSharp.Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp.Graphics/GraphicsDevice.cs @@ -143,7 +143,7 @@ namespace ComputeSharp.Graphics /// A new instance to use in a compute shader internal ID3D12RootSignature CreateRootSignature(VersionedRootSignatureDescription rootSignatureDescription) { - return NativeDevice.CreateRootSignature(rootSignatureDescription); + return NativeDevice.CreateRootSignature(0, rootSignatureDescription); } /// diff --git a/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs b/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs index be1af1ef..b09990a0 100644 --- a/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs +++ b/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs @@ -23,11 +23,16 @@ namespace ComputeSharp.Graphics.Helpers { List<(ID3D12Device, AdapterDescription)> devices = new List<(ID3D12Device, AdapterDescription)>(); - foreach (IDXGIAdapter1 adapter in factory.Adapters1) + int i = 0; + + while (factory.EnumAdapters1(i++, out IDXGIAdapter1? adapter).Success && !(adapter is null)) { if (adapter.Description.DedicatedVideoMemory == 0) continue; + if (D3D12.D3D12CreateDevice(adapter, FeatureLevel.Level_12_0, out ID3D12Device device).Success) + { devices.Add((device, adapter.Description)); + } } return devices; diff --git a/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj b/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj index a46b9c92..93734de0 100644 --- a/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj +++ b/src/ComputeSharp.Shaders/ComputeSharp.Shaders.csproj @@ -7,11 +7,11 @@ - - + + - - + + diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index 2a0d5294..aa1d99a3 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/ComputeSharp/ComputeSharp.nuspec b/src/ComputeSharp/ComputeSharp.nuspec index 7bbc3e6c..8554457f 100644 --- a/src/ComputeSharp/ComputeSharp.nuspec +++ b/src/ComputeSharp/ComputeSharp.nuspec @@ -16,14 +16,14 @@ dotnet net netcore netstandard csharp library graphics shader hlsl compute gpu - + - - - + + + - - + +