-
-
Notifications
You must be signed in to change notification settings - Fork 581
Closed
Labels
type:supportSupport issueSupport issue
Description
Plugin Version or Commit ID
v0.12.0
Unity Version
2021.3.8
Your Host OS
WIndows 10.
Target Platform
Android, iOS
Description
Hi, @homuler, thank you for your effort developing this plugin.
Is there a way to use GPUBuffer for Android/iOS (GPU) with tasks solutions to avoid copying texture back to CPU? As some mid-grade devices like Motorolla Edge having hard times preprocessing textures, mid-grade iOS devices having a delay in async mode because of async readback is not always finishing on same frame.
I understand its wrong but what i have tried it using gpubuffer ptr to make Image instance to be used in DetectAsync method from yours tasks implementation.
Thank you in advance for any guidance and tips.
Code to Reproduce the issue
Wrong solution i tried )
faceTextureFrame.ReadTextureOnGPU(faceTex);
var glContext = GlContext.GetCurrent();
var glTextureBuffer = new GlTextureBuffer(faceTextureFrame.GetTextureName(), faceTextureFrame.width, faceTextureFrame.height,
faceTextureFrame.gpuBufferformat, faceTextureFrame.onDeletion, glContext);
var gpuBuffer = new GpuBuffer(glTextureBuffer);
Image im = new Image(gpuBuffer.mpPtr);
_faceRunner.ProcessFrameAsyc(im);
where ProcessFrameAsyc is just a wrapper for DetectAsync
crash log
GLBufferCrashLog.txt
Additional Context
No response
Metadata
Metadata
Assignees
Labels
type:supportSupport issueSupport issue