Implemented support for mutable static fields

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-18 00:35:43 +02:00
1 親 203aa758b8
コミット 07c1c8ea24
3ファイル変更
+31 -10

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

+8
ファイルの表示
@@ -187,6 +187,14 @@ namespace ComputeSharp.Shaders.Translation
ShaderSyntaxRewriter syntaxRewriter = new ShaderSyntaxRewriter(semanticModel);
root = (MethodDeclarationSyntax)syntaxRewriter.Visit(root);
// Register the captured static fields
foreach (var item in syntaxRewriter.StaticFields)
{
_VariableFields.Add(item.FieldInfo);
string typeName = HlslKnownTypes.GetMappedName(item.FieldInfo.FieldType);
_FieldsList.Add(new CapturedFieldInfo(item.FieldInfo.FieldType, typeName, item.Name));
}
// Get the thread ids identifier name and shader method body
ThreadsIdsVariableName = root.ParameterList.Parameters.First().Identifier.Text;
MethodBody = root.Body.ToFullString();