5 コミット
作成者 SHA1 メッセージ 日付
routersys 36293e28e6 バージョンをv1.1.3へ更新する
リリース / build-and-release (workflow_dispatch) Actions がタグ v1.1.3 のコミットから作成しました
2026-10-03 17:22:47 +09:00
routersys cb4ce0276e 格子の資源が回収された後に計算し直す試験を追加する 2026-10-03 17:05:35 +09:00
routersys f322f174b7 資源が回収された後の処理器の描画の試験を追加する 2026-10-03 16:58:01 +09:00
routersys 0ef3ada3ec 格子の資源が回収された後の描画の試験を追加する 2026-10-03 16:58:01 +09:00
routersys 6386c5b4de 回収された格子の資源を描画の前に作り直す
・GPUのメモリが逼迫して資源が回収された後に、描画が失敗し続ける不具合を修正-F
2026-10-03 16:58:00 +09:00
5個のファイルの変更、77行の追加、6行の削除

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

+1 -1
ファイルの表示
@@ -1,5 +1,5 @@
========================================
氷晶成長 for YMM4 v1.1.2
氷晶成長 for YMM4 v1.1.3
========================================
YukkuriMovieMaker4上で動作する、素材の縁を結晶の核とみなし、
Gravner–Griffeathの雪結晶成長モデルで氷晶を成長させて霜として描画する
+24
ファイルの表示
@@ -509,6 +509,30 @@ public sealed class CrystallineGrowthEffectProcessorTests
}
}
[Fact(Timeout = 60000)]
public async Task AProcessorDrawsLikeAFreshOneAfterTheDeviceReclaimsIdleMemory()
{
await Task.Run(() =>
{
using var devices = new GraphicsDevices();
using var context = devices.CreateContext();
RequireInterop(context);
using var source = new SourceImage(context, Size, Size, (x, y) => x is >= 16 and < 48 && y is >= 16 and < 48 ? Bgra.Opaque(80, 200, 255) : Bgra.Transparent);
var effect = new CrystallineGrowthEffect();
using var processor = effect.CreateVideoEffect(context);
processor.SetInput(source.Bitmap);
RenderFrame(context, processor, 0);
GraphicsDevice.GetDefault().TrimMemory();
var reclaimed = RenderFrame(context, processor, 0);
using var fresh = effect.CreateVideoEffect(context);
fresh.SetInput(source.Bitmap);
var expected = RenderFrame(context, fresh, 0);
Assert.True(reclaimed.SamePixelsAs(expected));
}, TestContext.Current.CancellationToken);
}
[Fact]
public void AFailureWhileUpdatingIsNotSwallowed()
{
+35
ファイルの表示
@@ -185,6 +185,41 @@ public sealed class CrystallineGrowthPipelineTests
Assert.True(shortReach <= 80 + 32 + 12 + 8);
}
[Fact]
public void APipelineWhoseGridWasReclaimedDrawsLikeAFreshOne()
{
using var pipeline = CreatePipeline();
using var fresh = CreatePipeline();
var source = Square(64, 64, 16, 16, 32, 32);
var parameters = Parameters();
Render(pipeline, source, 64, 64, parameters);
GraphicsDevice.GetDefault().TrimMemory();
var reused = Render(pipeline, source, 64, 64, parameters);
var expected = Render(fresh, source, 64, 64, parameters);
Assert.Equal(expected, reused);
}
[Fact]
public void AReclaimedGridIsSimulatedAgain()
{
using var pipeline = CreatePipeline();
var parameters = Parameters();
var device = GraphicsDevice.GetDefault();
using var texture = device.AllocateReadWriteTexture2D<Bgra32, Float4>(64, 64);
Upload(texture, Square(64, 64, 16, 16, 32, 32));
var first = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters, hashSource: true);
var repeated = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters, hashSource: true);
device.TrimMemory();
var reclaimed = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters, hashSource: true);
Assert.True(first);
Assert.False(repeated);
Assert.True(reclaimed);
}
[Fact]
public void AWarmPipelineAllocatesNoManagedMemory()
{
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.1.2</Version>
<Version>1.1.3</Version>
<Platforms>AnyCPU;x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+16 -4
ファイルの表示
@@ -440,10 +440,10 @@ internal sealed class CrystallineGrowthPipeline : IDisposable
private void EnsureGrid(int gridWidth, int gridHeight)
{
if (_gridWidth == gridWidth && _gridHeight == gridHeight)
return;
var resized = _gridWidth != gridWidth || _gridHeight != gridHeight;
if (resized)
DisposeGridBuffers();
DisposeGridBuffers();
var gridLength = gridWidth * gridHeight;
if (!_host.TryEnsureGrid(
new CrystallineGrowthGridResources.Plan(
@@ -456,8 +456,20 @@ internal sealed class CrystallineGrowthPipeline : IDisposable
maskLength: gridLength,
reachMaskLength: gridLength,
renderMassLength: gridLength),
out _))
out var changed))
throw new InvalidOperationException();
if (!resized)
{
if (changed)
{
_structureKey = null;
_geometryKey = null;
ReleaseGeometry();
}
return;
}
_birth = _device.AllocateReadWriteBuffer<int>(gridLength);
_birthReadBack = _device.AllocateReadBackBuffer<int>(gridLength);
_cachedBirth = new int[gridLength];