厳密な割り当てテストを復元しWARPでは償却検証のみ実行
リリース / build-and-release (workflow_dispatch) Actions がタグ v1.0.0 のコミットから作成しました

このコミットが含まれているのは:
routersys committed 2026-07-17 19:15:19 +09:00
1 親 52d987d84c
コミット 5a3477eabc
1ファイル変更
+41 -8
+41 -8
ファイルの表示
@@ -396,15 +396,11 @@ public sealed class DielectricBreakdownEffectTests
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
var minimum = long.MaxValue;
for (var iteration = 0; iteration < 16; iteration++)
{
var before = GC.GetAllocatedBytesForCurrentThread();
pipeline.Process(source, destination, width, height, in parameters);
minimum = Math.Min(minimum, GC.GetAllocatedBytesForCurrentThread() - before);
}
var before = GC.GetAllocatedBytesForCurrentThread();
pipeline.Process(source, destination, width, height, in parameters);
var allocated = GC.GetAllocatedBytesForCurrentThread() - before;
Assert.Equal(0, minimum);
Assert.Equal(0, allocated);
}
[Fact]
@@ -449,6 +445,43 @@ public sealed class DielectricBreakdownEffectTests
return;
}
var device = GraphicsDevice.GetDefault();
if (!device.IsHardwareAccelerated)
{
Assert.Skip("A hardware GPU is required to keep the submission queue drained.");
return;
}
const int width = 64;
const int height = 64;
using var source = InteropServices.AllocateSharedReadWriteTexture2D<Bgra32, Float4>(device, width, height);
using var destination = InteropServices.AllocateSharedReadWriteTexture2D<Bgra32, Float4>(device, width, height);
var parameters = CreateParameters();
for (var iteration = 0; iteration < 4; iteration++)
pipeline.Process(source, destination, width, height, in parameters);
pipeline.WaitForCompletion();
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
var before = GC.GetAllocatedBytesForCurrentThread();
pipeline.Process(source, destination, width, height, in parameters);
var allocated = GC.GetAllocatedBytesForCurrentThread() - before;
pipeline.WaitForCompletion();
Assert.Equal(0, allocated);
}
[Fact]
public void SubmittedSharedTexturePipelineAllocationsAmortizeToZero()
{
using var pipeline = DielectricBreakdownPipeline.TryCreate();
if (pipeline is null)
{
Assert.Skip("Direct3D 12 is unavailable.");
return;
}
const int width = 64;
const int height = 64;
var device = GraphicsDevice.GetDefault();