diff --git a/src/ComputeSharp.Graphics/Helpers/DeviceHelper.Enumerator.cs b/src/ComputeSharp.Graphics/Helpers/DeviceHelper.Enumerator.cs
index 8fe0dd92..be3c34f6 100644
--- a/src/ComputeSharp.Graphics/Helpers/DeviceHelper.Enumerator.cs
+++ b/src/ComputeSharp.Graphics/Helpers/DeviceHelper.Enumerator.cs
@@ -159,7 +159,11 @@ namespace ComputeSharp.Graphics.Helpers
dxgiAdapter1.Get()->GetDesc1(&dxgiDescription1).Assert();
- if (dxgiDescription1.DedicatedVideoMemory == 0) continue;
+ if (dxgiDescription1.VendorId == MicrosoftVendorId &&
+ dxgiDescription1.DeviceId == WarpDeviceId)
+ {
+ continue;
+ }
HRESULT createDeviceResult = FX.D3D12CreateDevice(
dxgiAdapter1.AsIUnknown().Get(),
diff --git a/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs b/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs
index 036f771a..8913be29 100644
--- a/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs
+++ b/src/ComputeSharp.Graphics/Helpers/DeviceHelper.cs
@@ -14,6 +14,16 @@ namespace ComputeSharp.Graphics.Helpers
///
internal static partial class DeviceHelper
{
+ ///
+ /// The vendor id for Microsoft adapters (the "Microsoft Basic Render").
+ ///
+ private const uint MicrosoftVendorId = 0x1414;
+
+ ///
+ /// The device id for the WARP device.
+ ///
+ private const uint WarpDeviceId = 0x8C;
+
///
/// Gets whether or not there is a default device available, without creating it.
///
@@ -92,7 +102,11 @@ namespace ComputeSharp.Graphics.Helpers
dxgiAdapter1.Get()->GetDesc1(dxgiDescription1).Assert();
- if (dxgiDescription1->DedicatedVideoMemory == 0) continue;
+ if (dxgiDescription1->VendorId == MicrosoftVendorId &&
+ dxgiDescription1->DeviceId == WarpDeviceId)
+ {
+ continue;
+ }
HRESULT createDeviceResult = FX.D3D12CreateDevice(
dxgiAdapter1.AsIUnknown().Get(),
diff --git a/tests/ComputeSharp.Tests/InitializationTests.cs b/tests/ComputeSharp.Tests/InitializationTests.cs
index 372cebba..4149d0af 100644
--- a/tests/ComputeSharp.Tests/InitializationTests.cs
+++ b/tests/ComputeSharp.Tests/InitializationTests.cs
@@ -24,16 +24,6 @@ namespace ComputeSharp.Tests
Assert.IsTrue(gpu.Luid != default);
Assert.IsTrue(gpu.Name is { Length: > 0 });
-
- if (gpu.IsHardwareAccelerated)
- {
- Assert.IsTrue(gpu.DedicatedMemorySize != 0);
- }
- else
- {
- Assert.IsTrue(gpu.SharedMemorySize != 0);
- }
-
Assert.IsTrue(gpu.ComputeUnits != 0);
Assert.IsTrue(gpu.WavefrontSize != 0);
}