From a62848d8f5c8538619bfcec42bcfc7693ffe0a57 Mon Sep 17 00:00:00 2001 From: routersys Date: Tue, 20 Oct 2026 19:17:50 +0900 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=AD=90=E3=82=92=E8=AA=AD=E3=82=80?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E3=82=B9=E3=83=AC=E3=83=83=E3=83=89?= =?UTF-8?q?=E3=82=B0=E3=83=AB=E3=83=BC=E3=83=97=E3=82=92=E6=A8=AA=E9=95=B7?= =?UTF-8?q?=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inflate/InflateGpuShaders.cs | 8 ++++---- Inflate/InflateSettings.cs | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Inflate/InflateGpuShaders.cs b/Inflate/InflateGpuShaders.cs index 0863e1f..72a4a93 100644 --- a/Inflate/InflateGpuShaders.cs +++ b/Inflate/InflateGpuShaders.cs @@ -234,7 +234,7 @@ internal readonly partial struct CoarseNeighborShader( } } -[ThreadGroupSize(DefaultThreadGroupSizes.XY)] +[ThreadGroupSize(InflateSettings.RowGroupWidth, InflateSettings.RowGroupHeight, 1)] [GeneratedComputeShaderDescriptor] internal readonly partial struct ResidualShader( ReadWriteBuffer potential, @@ -283,7 +283,7 @@ internal readonly partial struct ResidualShader( } } -[ThreadGroupSize(DefaultThreadGroupSizes.XY)] +[ThreadGroupSize(InflateSettings.RowGroupWidth, InflateSettings.RowGroupHeight, 1)] [GeneratedComputeShaderDescriptor] internal readonly partial struct RestrictResidualShader( ReadWriteBuffer residual, @@ -407,7 +407,7 @@ internal readonly partial struct CoarseSolveShader( } } -[ThreadGroupSize(DefaultThreadGroupSizes.XY)] +[ThreadGroupSize(InflateSettings.RowGroupWidth, InflateSettings.RowGroupHeight, 1)] [GeneratedComputeShaderDescriptor] internal readonly partial struct ProlongShader( ReadWriteBuffer potential, @@ -631,7 +631,7 @@ internal readonly partial struct CorrectionScaleShader( } } -[ThreadGroupSize(DefaultThreadGroupSizes.XY)] +[ThreadGroupSize(InflateSettings.RowGroupWidth, InflateSettings.RowGroupHeight, 1)] [GeneratedComputeShaderDescriptor] internal readonly partial struct GaussSeidelShader( ReadWriteBuffer mask, diff --git a/Inflate/InflateSettings.cs b/Inflate/InflateSettings.cs index 0e8bfba..4fe4e2c 100644 --- a/Inflate/InflateSettings.cs +++ b/Inflate/InflateSettings.cs @@ -10,6 +10,8 @@ internal static class InflateSettings public const float CoverageThreshold = 0.5f; public const uint CoarseSolidCount = 3u; public const uint CoarsePairCount = 2u; + public const int RowGroupWidth = 32; + public const int RowGroupHeight = 2; public const int CorrectionGroupSize = 8; public const int CorrectionGroupThreads = CorrectionGroupSize * CorrectionGroupSize; public const int CorrectionReduceThreads = 256;