Always generate unsafe accessors for all fields

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-20 20:51:40 +01:00
1 親 35a73051d7
コミット 531262e6f2
4ファイル変更
+14 -25

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

@@ -82,13 +82,13 @@ partial class ComputeShaderDescriptorGenerator
}
else if (HlslKnownTypes.IsKnownHlslType(typeName))
{
// TODO: share the logic and fix the field path parts (here they just always return accessible leaves for now)
fields.Add(GetHlslKnownTypeFieldInfo(fieldPath.Add(new FieldPathPart.Leaf(fieldName, true)), typeName, ref rawDataOffset));
// TODO: share the logic and fix the field path parts
fields.Add(GetHlslKnownTypeFieldInfo(fieldPath.Add(new FieldPathPart.Leaf(fieldName)), typeName, ref rawDataOffset));
}
else if (fieldSymbol.Type.IsUnmanagedType)
{
// Custom struct type defined by the user
GetInfo(compilation, fieldSymbol.Type, fieldPath.Add(new FieldPathPart.Leaf(fieldName, true)), ref resourceOffset, ref rawDataOffset, fields, resources);
GetInfo(compilation, fieldSymbol.Type, fieldPath.Add(new FieldPathPart.Leaf(fieldName)), ref resourceOffset, ref rawDataOffset, fields, resources);
}
}
}