Silk.NET
Silk.NET copied to clipboard
Improve string marshalling performance by using performant .NET APIs
The following discussion from #505 should be resolved:
Please forward to Utf8.FromUtf16 on >= netcore3.0 Something like
#if NET5_0 Debug.Assert(Utf8.FromUtf16(input, span, out _, out convertedBytes, true, true) == OperationStatus.Done); #endifWe probably don't care for the returned status, it can only be done, or theoretically,
DestinationTooSmallbut that can only happen if GetMaxSizeOf fails. (If you don't think this is fit for this PR, do just reference this in a new issue, and I'll get back to it asap, we absolutely need to track this though, perf of the string marshalling is miserable)