Add ComputeContext unit tests
このコミットが含まれているのは:
1 親
e02b2c7059
コミット
3a4373d36d
3ファイル変更
+182
-4
検索条件に一致するファイルはありません
@@ -286,12 +286,14 @@ public sealed partial class HlslBokehBlurProcessor
|
||||
|
||||
kernel.CopyFrom(Kernels[j]);
|
||||
|
||||
GraphicsDevice.For<VerticalConvolutionProcessor>(
|
||||
using var context = GraphicsDevice.CreateComputeContext();
|
||||
|
||||
context.For<VerticalConvolutionProcessor>(
|
||||
source.Width,
|
||||
source.Height,
|
||||
new(texture, reals, imaginaries, kernel));
|
||||
|
||||
GraphicsDevice.For<HorizontalConvolutionAndAccumulatePartialsProcessor>(
|
||||
context.For<HorizontalConvolutionAndAccumulatePartialsProcessor>(
|
||||
source.Width,
|
||||
source.Height,
|
||||
new(parameters.Z, parameters.W, reals, imaginaries, temporary, kernel));
|
||||
|
||||
@@ -105,8 +105,11 @@ public sealed partial class HlslGaussianBlurProcessor
|
||||
using ReadWriteTexture2D<Rgba32, Vector4> firstPassTexture = GraphicsDevice.AllocateReadWriteTexture2D<Rgba32, Vector4>(source.Width, source.Height);
|
||||
using ReadOnlyBuffer<float> kernelBuffer = GraphicsDevice.AllocateReadOnlyBuffer(Kernel);
|
||||
|
||||
GraphicsDevice.For<VerticalConvolutionProcessor>(source.Width, source.Height, new(sourceTexture, firstPassTexture, kernelBuffer));
|
||||
GraphicsDevice.For<HorizontalConvolutionProcessor>(source.Width, source.Height, new(firstPassTexture, sourceTexture, kernelBuffer));
|
||||
using (var context = GraphicsDevice.CreateComputeContext())
|
||||
{
|
||||
context.For<VerticalConvolutionProcessor>(source.Width, source.Height, new(sourceTexture, firstPassTexture, kernelBuffer));
|
||||
context.For<HorizontalConvolutionProcessor>(source.Width, source.Height, new(firstPassTexture, sourceTexture, kernelBuffer));
|
||||
}
|
||||
|
||||
sourceTexture.CopyTo(span);
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする