Commit Graph

225 Commits

Author SHA1 Message Date
mafiesto4 860dce487f Codestyle fixes 2023-08-14 15:47:24 +02:00
mafiesto4 6af6afc6a4 Merge branch 'managedhandlepool_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedhandlepool_refactor 2023-08-14 15:43:57 +02:00
mafiesto4 d5245f6a8c Merge branch 'managedarray_pool_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedarray_pool_cache 2023-08-14 15:39:44 +02:00
mafiesto4 342ec4c3c2 Merge branch 'arraytype_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-arraytype_cache 2023-08-14 15:36:27 +02:00
mafiesto4 13e0582ef2 Codestyle fixes 2023-08-14 15:36:19 +02:00
mafiesto4 238ff38bf2 Merge branch 'invoker_ret_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-invoker_ret_refactor 2023-08-14 15:31:50 +02:00
GoaLitiuM 1b0976d99b Refactor ManagedHandlePool
Weak handles are now stored in one sets of dictionarys synchronized with
other threads. This so far seems the fastest way to manage the
dictionaries for now.
2023-08-13 22:14:37 +03:00
GoaLitiuM 65de284a66 Optimize managed method invokers return value marshalling 2023-08-13 22:10:07 +03:00
GoaLitiuM d9ee8f4665 Cache pooled ManagedArray managed handles 2023-08-13 21:56:52 +03:00
GoaLitiuM 1254af8bbb Optimize UnboxValue performance, safety and memory usage
- Avoids unnecessary boxing of the converted values by storing them in
unmanaged memory.
- Wrap ToNative-method in a delegate and cache it
- Fixes returning address to unpinned memory by pinning POD-types for
a short period of time.
2023-08-13 21:53:42 +03:00
GoaLitiuM 44b70d87e5 Cache MakeArrayType results in native interop 2023-08-13 21:42:40 +03:00
GoaLitiuM 9d8105e3f3 Separate managed assembly unloading and scripting ALC reinitialization
Fixes an issue with multiple managed assemblies unloading and releasing
all cached data before native resources were fully released in other
assemblies.
2023-08-08 17:39:31 +03:00
mafiesto4 619b0bff6b Merge branch 'fix/string-marshalling' of https://github.com/mtszkarbowiak/FlaxEngine into mtszkarbowiak-fix/string-marshalling 2023-07-24 18:14:24 +02:00
mafiesto4 11bb6d4364 Fix crash when using custom Anim Graph node (.NET 7 regression) 2023-07-24 14:23:28 +02:00
Mateusz Karbowiak 91e0e2011c Fix visibility of string wrapper 2023-07-22 18:44:36 +02:00
GoaLitiuM ff56152ef2 Fix releasing non-collectible types with collectible generic types 2023-07-15 13:20:56 +03:00
mafiesto4 04ef3c60d5 Fix regression from c79952a4d6 2023-07-05 09:27:21 +02:00
mafiesto4 c79952a4d6 Implement missing dotnet7 interop for field and stabilize interop 2023-07-04 17:57:59 +02:00
mafiesto4 9a1fd12a85 Fix sizeof struct within generic type instance
#1219
2023-07-03 11:42:15 +02:00
GoaLitiuM 28335478bd Fix managed library location resolver 2023-07-02 21:56:41 +03:00
mafiesto4 3119c50789 Fix nullable warnings 2023-06-28 20:09:01 +02:00
GoaLitiuM 87e96a9017 Fix native library lookup after hot reload 2023-06-20 16:29:04 +03:00
mafiesto4 6b8d8b7913 Various fixes and improvements to auto-generated bindings usability 2023-06-12 14:35:11 +02:00
mafiesto4 652f8ccb8d Fix crash when reading field value from C# in AOT on iOS 2023-06-11 15:05:14 +02:00
mafiesto4 ad1c573678 Fix false-positive error when interop structure has a additional memory size (alignment) 2023-05-25 00:12:54 +02:00
mafiesto4 c2cd3b64ff Improve generated bindings code usability in Editor 2023-05-24 23:50:51 +02:00
mafiesto4 3e792e6cd7 Add NativeInteropException for native interop crashes 2023-05-19 13:52:30 +02:00
mafiesto4 b402603b1d Merge branch 'latefixedupdate' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-latefixedupdate 2023-05-12 14:41:49 +02:00
GoaLitiuM cbe07b842f Fix resolving managed scripts references in Editor 2023-05-11 22:11:46 +03:00
mafiesto4 637850d06c Fix crash when C# type has missing empty ctor or it throws an exception
#1019
2023-05-10 20:41:58 +02:00
mafiesto4 c73897ce7f Merge branch 'object_array_marshalling' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-object_array_marshalling 2023-05-10 09:22:22 +02:00
GoaLitiuM da149d32cf Force GC to run periodically in order to reduce stuttering 2023-05-08 23:29:39 +03:00
GoaLitiuM 66de1e744a Use Unsafe.As casting in generated managed marshallers 2023-05-08 23:28:54 +03:00
GoaLitiuM cae07f3623 Optimize marshalling managed arrays of object references 2023-05-08 23:28:49 +03:00
mafiesto4 69cdb1268a Merge remote-tracking branch 'origin/master' into 1.6 2023-05-08 12:58:42 +02:00
mafiesto4 ec2226f06e Fixes for dotnet7 after #1061 and 5e31a678bd 2023-05-05 11:58:11 +02:00
mafiesto4 17fbfc969b Merge branch 'weak_handle_improvements_2' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-weak_handle_improvements_2 2023-05-05 10:04:27 +02:00
mafiesto4 f82e4b332d Merge branch 'reuse_pooled_array_buffers' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-reuse_pooled_array_buffers 2023-05-05 10:02:28 +02:00
GoaLitiuM 5efbfc86ad Prevent weak managed handle collections during long operations
Loading larger scenes may trigger multiple collections during the P/Invoke call,
so prevent collections from happening within a second to avoid in-flight handles
getting collected before the operation finishes.
2023-05-01 20:08:00 +03:00
GoaLitiuM 36a9ffe3aa Try to reuse previously allocated buffers in pooled ManagedArrays 2023-05-01 20:07:27 +03:00
GoaLitiuM 65b63da93a Improve custom attributes caching in managed classes 2023-05-01 20:06:51 +03:00
GoaLitiuM 320955f8b7 Use weak handles for marshalling temporary managed-to-native parameters 2023-04-29 12:41:02 +03:00
GoaLitiuM 6378f62acd Improve weak managed handle collection
Use thread-static pools for weak managed handles in order to reduce locking,
and collect the handles either right after garbage collection or when the pool
size becomes too large.
2023-04-29 12:40:58 +03:00
mafiesto4 8b2d3db3f1 Fix passing boxed reference values to managed thunk and properly unbox non-POD structures 2023-04-18 15:54:54 +02:00
mafiesto4 f046642ba7 Improve stability by fixing various crashes with dotnet7 2023-04-18 12:36:33 +02:00
mafiesto4 9a84f9e4ac Improve native library path on dotnet when using plugins 2023-04-17 14:06:47 +02:00
mafiesto4 609217a3bb Fix using Nullable<T> in C# properties
Fixes #935
2023-04-12 15:47:03 +02:00
GoaLitiuM 558a7d99ff Add LateFixedUpdate event for scripts 2023-04-09 18:26:33 +03:00
GoaLitiuM 7df5a7c646 Fix managed method invoker delegate caching 2023-04-09 18:25:14 +03:00
mafiesto4 84bb56d68b Minor dotnet tweaks 2023-04-03 14:12:27 +02:00