Added support for static fields of any type
このコミットが含まれているのは:
1 親
af2cbe43c8
コミット
a2e5d5326f
2ファイル変更
+3
-5
検索条件に一致するファイルはありません
@@ -108,8 +108,8 @@ namespace ComputeSharp.Shaders.Extensions
|
||||
};
|
||||
}
|
||||
|
||||
// Captured variable, treat it like any other captured variable in the closure
|
||||
if (!isReadonly && fieldInfo != null)
|
||||
// Captured field, treat it like any other captured variable in the closure
|
||||
if (fieldInfo != null)
|
||||
{
|
||||
string name = $"{containingMemberSymbolInfo.Symbol.Name}_{fieldInfo.Name}";
|
||||
variable = (name, fieldInfo);
|
||||
|
||||
@@ -216,9 +216,7 @@ namespace ComputeSharp.Shaders.Translation
|
||||
// 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));
|
||||
LoadFieldInfo(item.FieldInfo, item.Name);
|
||||
}
|
||||
|
||||
// Get the thread ids identifier name and shader method body
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする