diff --git a/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs b/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs index e2bd3929..1232512f 100644 --- a/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs +++ b/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs @@ -96,7 +96,7 @@ namespace ComputeSharp.Shaders.Renderer builder.Append(buffer.FieldType); builder.Append(' '); builder.Append(buffer.FieldName); - builder.Append("[2];"); + builder.AppendLine("[2];"); builder.AppendLine('}'); break; diff --git a/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs b/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs index b2cdd86d..a04b9b61 100644 --- a/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs +++ b/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs @@ -29,7 +29,11 @@ namespace ComputeSharp.Shaders.Translation /// /// The number of constant buffers to define in the shader. /// - private uint constantBuffersCount; + /// + /// This starts at 1 as there's always an initial constant buffer before user-defined ones, containing + /// the captured scalar and vector values as well as the iteration ranges for the shader dispatch. + /// + private uint constantBuffersCount = 1; /// /// The number of readonly buffers to define in the shader.