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

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

+1 -1
ファイルの表示
@@ -1,5 +1,5 @@
========================================
浮世絵 for YMM4 v1.2.2
浮世絵 for YMM4 v1.2.3
========================================
YukkuriMovieMaker4上で動作する、素材を多色木版画の原画とみなし、
エッジ接線流に沿った主線と、限定パレットの階調にまとめた色面を刷り重ねて
+24
ファイルの表示
@@ -264,6 +264,30 @@ public sealed class UkiyoeEffectProcessorTests
Assert.Equal(secondSize > firstSize, after.Width > before.Width);
}
[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 UkiyoeEffect();
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
ファイルの表示
@@ -238,6 +238,41 @@ public sealed class UkiyoePipelineTests
Assert.True(DarkPixels(withLines) > DarkPixels(withoutLines));
}
[Fact]
public void APipelineWhoseGridWasReclaimedDrawsLikeAFreshOne()
{
using var pipeline = CreatePipeline();
using var fresh = CreatePipeline();
var source = Gradient(64, 64, 8, 8, 48, 48);
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, Gradient(64, 64, 8, 8, 48, 48));
var first = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters);
var repeated = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters);
device.TrimMemory();
var reclaimed = pipeline.Simulate(texture, 64, 64, 0, 0, 64, 64, in parameters);
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.2.2</Version>
<Version>1.2.3</Version>
<Platforms>AnyCPU;x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+4 -4
ファイルの表示
@@ -274,16 +274,16 @@ internal sealed class UkiyoePipeline : IDisposable
private void EnsureGrid(int gridWidth, int gridHeight)
{
if (_gridWidth == gridWidth && _gridHeight == gridHeight)
return;
var gridLength = gridWidth * gridHeight;
if (!_host.TryEnsureGrid(
new UkiyoeGridResources.Plan(
gridLength, gridLength, gridLength, gridLength, gridLength, gridLength, gridLength, gridLength, gridLength),
out _))
out var changed))
throw new InvalidOperationException();
if (!changed && _gridWidth == gridWidth && _gridHeight == gridHeight)
return;
_cachedLitCount = 0;
_cachedBoundsMinX = int.MaxValue;
_cachedBoundsMinY = int.MaxValue;