77namespace SixLabors . ImageSharp . Drawing . Processing . Backends ;
88
99/// <summary>
10- /// GPU stage that flattens encoded path segments into a device-space line soup, expands
11- /// strokes via the CPU PolygonStroker port, and accumulates per-path bounding boxes for the
12- /// downstream stages. Wraps <c>flatten .wgsl</c>.
10+ /// GPU stage that lowers encoded path segments into device-space lines and expands strokes
11+ /// with the CPU PolygonStroker port. The stage also accumulates per-path bounding boxes for
12+ /// downstream stages. It wraps <c>path_lowering .wgsl</c>.
1313/// </summary>
14- internal static unsafe class FlattenComputeShader
14+ internal static unsafe class PathLoweringComputeShader
1515{
1616 /// <summary>
17- /// Gets the generated WGSL source bytes for the flatten stage.
17+ /// Gets the generated WGSL source bytes for the path-lowering stage.
1818 /// </summary>
19- public static ReadOnlySpan < byte > ShaderCode => GeneratedWgslShaderSources . FlattenCode ;
19+ public static ReadOnlySpan < byte > ShaderCode => GeneratedWgslShaderSources . PathLoweringCode ;
2020
2121 /// <summary>
2222 /// Gets the WGSL entry point used by this shader.
@@ -35,7 +35,7 @@ public static uint GetDispatchX(uint pathTagCount)
3535 => ( pathTagCount + 255U ) / 256U ;
3636
3737 /// <summary>
38- /// Creates the bind-group layout required by the flatten stage.
38+ /// Creates the bind-group layout required by the path-lowering stage.
3939 /// </summary>
4040 /// <param name="api">The WebGPU API facade.</param>
4141 /// <param name="device">The device that owns the staged-scene pipelines.</param>
@@ -48,7 +48,7 @@ public static bool TryCreateBindGroupLayout(
4848 out WGPUBindGroupLayoutImpl * layout ,
4949 out string ? error )
5050 {
51- // Bindings match flatten .wgsl:
51+ // Bindings match path_lowering .wgsl:
5252 // 0 config uniform
5353 // 1 scene (read-only path tags, points, styles and transforms)
5454 // 2 tag_monoids (read-only pathtag prefix sums from the scan stages)
@@ -72,7 +72,7 @@ public static bool TryCreateBindGroupLayout(
7272 layout = api . DeviceCreateBindGroupLayout ( device , in descriptor ) ;
7373 if ( layout is null )
7474 {
75- error = "Failed to create the flatten bind-group layout." ;
75+ error = "Failed to create the path-lowering bind-group layout." ;
7676 return false ;
7777 }
7878
0 commit comments