Removed mustache code for single variable buffers

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-17 10:31:41 +02:00
1 親 1cf603e2af
コミット c74e0a0a07
3ファイル変更
+5 -14

検索条件に一致するファイルはありません

+1 -10
ファイルの表示
@@ -12,21 +12,12 @@ namespace ComputeSharp.Shaders.Renderer.Models.Fields
/// </summary>
public bool IsConstantBuffer { get; } = true;
/// <summary>
/// Gets whether or not this constant buffer actually contains a single, explicit variable
/// </summary>
public bool IsSingleValue { get; }
/// <summary>
/// Creates a new <see cref="ConstantBufferFieldInfo"/> instance with the specified parameters
/// </summary>
/// <param name="fieldType">The type of the current field</param>
/// <param name="fieldName">The name of the current field</param>
/// <param name="bufferIndex">The index of the current constant buffer field</param>
/// <param name="singleValue">Whether or not this constant buffer actually contains a single, explicit variable</param>
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) { }
}
}
+3 -3
ファイルの表示
@@ -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__;
+1 -1
ファイルの表示
@@ -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))
{