Reset default device on dispose
このコミットが含まれているのは:
1 親
4e5acba69c
コミット
93c82feb98
2ファイル変更
+7
-1
検索条件に一致するファイルはありません
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする