Updated mustache template

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-17 00:23:53 +02:00
1 親 de4731bd90
コミット ac2b962c98
2ファイル変更
+13 -15

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

+2 -12
ファイルの表示
@@ -16,19 +16,9 @@ namespace ComputeSharp.Shaders.Renderer.Models
public IReadOnlyList<FieldInfo> FieldsList { get; set; }
/// <summary>
/// Gets or sets the total number of threads to run on the X axis
/// Gets or sets the index for the constant buffer with the info on the target number of iterations on the X, Y and Z axes
/// </summary>
public int ThreadsX { get; set; }
/// <summary>
/// Gets or sets the total number of threads to run on the Y axis
/// </summary>
public int ThreadsY { get; set; }
/// <summary>
/// Gets or sets the total number of threads to run on the Z axis
/// </summary>
public int ThreadsZ { get; set; }
public int ThreadsXYZConstantBufferIndex { get; set; }
/// <summary>
/// Gets or sets the number of threads in the X group
+11 -3
ファイルの表示
@@ -20,13 +20,21 @@ cbuffer {{FieldName}}Buffer : register(b{{BufferIndex}})
{{/IsReadWriteBuffer}}
{{/FieldsList}}
{{!Threads XYZ targets buffer}}
cbuffer __XYZ___Buffer : register(b{{ThreadsXYZConstantBufferIndex}})
{
uint __x__;
uint __y__;
uint __z__;
}
{{!Shader entry point}}
[Shader("compute")]
[NumThreads({{NumThreadsX}}, {{NumThreadsY}}, {{NumThreadsZ}})]
void CSMain(uint3 {{ThreadsIdsVariableName}} : SV_DispatchThreadId)
{
if ({{ThreadsIdsVariableName}}.x < {{ThreadsX}} &&
{{ThreadsIdsVariableName}}.y < {{ThreadsY}} &&
{{ThreadsIdsVariableName}}.z < {{ThreadsZ}})
if ({{ThreadsIdsVariableName}}.x < __x__ &&
{{ThreadsIdsVariableName}}.y < __y__ &&
{{ThreadsIdsVariableName}}.z < __z__)
{{&ShaderBody}}
}