How to move Buffer created from local RenderingDevice to the main RenderingDevice

Godot Version

4.5.1

Question

I’m trying to get my marching cubes working without any GPU readback in Godot, and I’m very close. At the moment, I have successfully generated triangles and an indirect args buffer for the RenderingDevice.DrawListDrawIndirect call. I’ve been able to render a triangle using RenderingDevice.DrawListDrawIndirect, this used buffers with dummy triangle data put into a buffer using a rendering device obtained through RenderingServer.GetRenderingDevice.

The issue is, the compute shader that generates the triangles uses buffers created by RenderingServer.CreateLocalRenderingDevice. If I try to use the uniform set for the vertex buffer when trying to render, it just doesn’t work. I’m 99% sure it is because RenderingDevice can’t share RID’s with each other since they track them individually. I could probably use RenderingServer.BufferCopy, but that is obviously not ideal.

Is there a way of sharing a buffer between rendering devices so I can render the compute shader triangles?

Afaik, there’s no way to share between different devices without involving the CPU. Can you do everything on the main device?

I’m facing the same problem like you do. May I know if you have found any solution yet?