Reset default device on dispose

このコミットが含まれているのは:
Sergio Pedri committed 2022-07-31 23:26:11 +02:00
1 親 4e5acba69c
コミット 93c82feb98
2ファイル変更
+7 -1

検索条件に一致するファイルはありません

+6
ファイルの表示
@@ -94,6 +94,12 @@ partial class DeviceHelper
{
lock (DevicesCache)
{
// Remove the default device from the cache, if it has been disposed
if (device == defaultDevice)
{
defaultDevice = null;
}
DevicesCache.Remove(device.Luid);
if (Configuration.IsDebugOutputEnabled)
+1 -1
ファイルの表示
@@ -13,7 +13,7 @@ namespace ComputeSharp.Tests.DeviceLost;
[TestCategory("DeviceDisposal")]
public class DeviceDisposalTests
{
[CombinatorialTestMethod]
[TestMethod]
public unsafe void DeviceDisposal_GetDefault_ReferenceCounting()
{
using ComPtr<ID3D12Device> d3D12Device = default;