diff --git a/src/ComputeSharp.Shaders/Renderer/Models/Fields/ConstantBufferFieldInfo.cs b/src/ComputeSharp.Shaders/Renderer/Models/Fields/ConstantBufferFieldInfo.cs
index cb87c67d..5dff2be0 100644
--- a/src/ComputeSharp.Shaders/Renderer/Models/Fields/ConstantBufferFieldInfo.cs
+++ b/src/ComputeSharp.Shaders/Renderer/Models/Fields/ConstantBufferFieldInfo.cs
@@ -12,21 +12,12 @@ namespace ComputeSharp.Shaders.Renderer.Models.Fields
///
public bool IsConstantBuffer { get; } = true;
- ///
- /// Gets whether or not this constant buffer actually contains a single, explicit variable
- ///
- public bool IsSingleValue { get; }
-
///
/// Creates a new instance with the specified parameters
///
/// The type of the current field
/// The name of the current field
/// The index of the current constant buffer field
- /// Whether or not this constant buffer actually contains a single, explicit variable
- public ConstantBufferFieldInfo(string fieldType, string fieldName, int bufferIndex, bool singleValue) : base(fieldType, fieldName, bufferIndex)
- {
- IsSingleValue = singleValue;
- }
+ public ConstantBufferFieldInfo(string fieldType, string fieldName, int bufferIndex) : base(fieldType, fieldName, bufferIndex) { }
}
}
diff --git a/src/ComputeSharp.Shaders/Renderer/Templates/ShaderTemplate.mustache b/src/ComputeSharp.Shaders/Renderer/Templates/ShaderTemplate.mustache
index 735850a5..1c2c1f94 100644
--- a/src/ComputeSharp.Shaders/Renderer/Templates/ShaderTemplate.mustache
+++ b/src/ComputeSharp.Shaders/Renderer/Templates/ShaderTemplate.mustache
@@ -3,7 +3,7 @@
{{#IsConstantBuffer}}
cbuffer {{FieldName}}Buffer : register(b{{BufferIndex}})
{
- {{&FieldType}} {{FieldName}}{{^IsSingleValue}}[2]{{/IsSingleValue}};
+ {{&FieldType}} {{FieldName}}[2];
}
{{/IsConstantBuffer}}
{{!Readonly buffer}}
@@ -16,8 +16,8 @@ cbuffer {{FieldName}}Buffer : register(b{{BufferIndex}})
{{/IsReadWriteBuffer}}
{{/FieldsList}}
-{{!Threads XYZ targets buffer}}
-cbuffer __XYZ___Buffer : register(b{{ThreadsXYZConstantBufferIndex}})
+{{!Captured variables buffer}}
+cbuffer __Variables__Buffer : register(b{{ThreadsXYZConstantBufferIndex}})
{
uint __x__;
uint __y__;
diff --git a/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs b/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs
index 75cd3cbc..1cb1d820 100644
--- a/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs
+++ b/src/ComputeSharp.Shaders/Translation/ShaderLoader.cs
@@ -142,7 +142,7 @@ namespace ComputeSharp.Shaders.Translation
_Buffers.Add((descriptorRanges.Count - 1, (GraphicsResource)fieldValue));
string typeName = HlslKnownTypes.GetMappedName(fieldType.GenericTypeArguments[0]);
- _BuffersList.Add(new ConstantBufferFieldInfo(typeName, fieldName, ConstantBuffersCount++, false));
+ _BuffersList.Add(new ConstantBufferFieldInfo(typeName, fieldName, ConstantBuffersCount++));
}
else if (HlslKnownTypes.IsReadOnlyBufferType(fieldType))
{