0

Over here: Clean OOP and efficient GPU buffers: not possible without data duplication?

This isn't really a DOD question as it was marked duplicate. It's about avoiding duplication between memory allocated for CPU and GPU. I could very roughly see how DOD would help here but it's ultimately about tackling memory allocation and access between distinct hardware without duplication, like how to allocate a VBO in OpenGL and use it without storing redundant data on the CPU.

| |
2

The question may not look directly as a duplicate, but when you look into the comments, you see already a suggestion made by Caleth and me how to create objects referencing the "GPU data", assuming the latter follows a "structure of arrays" approach. And that is what this answer to the referenced duplicate was about.

I admit, maybe the connection is not clear at a first glance, but the OP did not respond to the closing, so I guess they were fine with it. But if you want to write an more specialized answer to the question, let me know, then I will vote for reopening.

| |
  • 1
    Fair point although I think SoAs are a completely different matter with respect to memory access patterns. The redundancy with the GPU tends to exist regardless of whether we use AoS or SoA reps, interleaved or not, indexed or not. Well, I'm a bit biased since it's one I find personally interesting. It's very difficult in lots of non-trivial applications to try to allocate memory only on the GPU and not keep a redundant version on the CPU that we maintain in sync/parallel. It took me many years to find a maintainable approach that can just keep things on the GPU side only. – user377672 Oct 26 at 15:07

You must log in to answer this question.