Updated mustache template for readonly buffers
このコミットが含まれているのは:
1 親
a93bcc807c
コミット
ee96c29f83
2ファイル変更
+10
-3
検索条件に一致するファイルはありません
@@ -12,10 +12,15 @@ 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>
|
||||
/// Gets the index of the current constant buffer field
|
||||
/// </summary>
|
||||
public int ConstantBufferIndex { get; set; }
|
||||
public int ConstantBufferIndex { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ConstantBufferFieldInfo"/> instance with the specified parameters
|
||||
@@ -23,9 +28,11 @@ namespace ComputeSharp.Shaders.Renderer.Models.Fields
|
||||
/// <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>
|
||||
public ConstantBufferFieldInfo(string fieldType, string fieldName, int bufferIndex) : base(fieldType, fieldName)
|
||||
/// <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)
|
||||
{
|
||||
ConstantBufferIndex = bufferIndex;
|
||||
IsSingleValue = singleValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ static {{&FieldType}} {{FieldName}} = {{FieldValue}};
|
||||
{{#IsConstantBuffer}}
|
||||
cbuffer {{FieldName}}Buffer : register(b{{ConstantBufferIndex}})
|
||||
{
|
||||
{{&FieldType}} {{FieldName}};
|
||||
{{&FieldType}} {{FieldName}}{{^IsSingleValue}}[2]{{/IsSingleValue}};
|
||||
}
|
||||
{{/IsConstantBuffer}}
|
||||
{{!Read write buffer}}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする