SHA256
Apply Optimized GPU Readback
This commit is contained in:
1 parent
3797cb7077
commit
9454226306
8 files changed
+208
-18
No files matched your search
@@ -52,15 +52,21 @@ namespace ADOFAIRenderer.Util.FFmpeg
|
||||
_ffmpegProcess.WaitForExit();
|
||||
}
|
||||
|
||||
public static byte[] RentRawBytes<T>(NativeArray<T> arr) where T : struct
|
||||
public static byte[] RentRawBytes(int size)
|
||||
{
|
||||
var array = ArrayPool<byte>.Shared.Rent(size);
|
||||
return array;
|
||||
}
|
||||
|
||||
/*public static byte[] RentRawBytes<T>(NativeArray<T> arr) where T : struct
|
||||
{
|
||||
var val = new NativeSlice<T>(arr).SliceConvert<byte>();
|
||||
var array = ArrayPool<byte>.Shared.Rent(val.Length);
|
||||
val.CopyTo(array);
|
||||
return array;
|
||||
}
|
||||
}*/
|
||||
|
||||
public static byte[] ToRawBytes<T>(NativeArray<T> arr) where T : struct
|
||||
protected static byte[] ToRawBytes<T>(NativeArray<T> arr) where T : struct
|
||||
{
|
||||
var val = new NativeSlice<T>(arr).SliceConvert<byte>();
|
||||
var array = new byte[val.Length];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using Unity.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ADOFAIRenderer.Util.FFmpeg
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user