Obtain IntPtr from Compute Buffer

Hi,
I’m currently trying to find a way to pass a pointer from a Compute Buffer to the dll. The dll then populates the buffer with a struct on the gpu side.
Is it possible to do something like this?
Or is there a way to create a vertex buffer and do this in Unity?

You mean the compute buffer on the CPU side or on the GPU side? It’s been awhile since I’ve worked with compute buffers, but I think the CPU side that you copy to the GPU could be done with Marshalling probably, but the memory on the GPU is stuck there until you transfer it back to the CPU. If I’m wrong hopefully someone will correct me, but that’s what I remember.

Basically you’d have to copy it from the GPU to the CPU side and access it on the CPU. You can’t just stick a pointer on the GPU side as far as I know. If it worked that way you wouldn’t need CPU side buffers at all, probably.