Copy VBO data from inbetween the pipeline


today i was asking myself the following question:

Is it possible to copy the (transformed/clipped) data of a vertex buffer object from device memory to cpu memory.


We certainly know it’s possible to copy VBO Data to host memory via

cudaGraphicsGLRegisterBuffer -> cudaGraphicsMapResources -> cudaGraphicsResourceGetMappedPointer -> cudaMemcpy(DTOH)

So far so easy. Now the thing is, that all the vertices are untransformed and on their initial position.

To draw the vertices, the gpu does multiply them with a bunch of matrices, to translate, scale and rotate them (and to do much other things finally).

Of course we can transform the data by ourself with a simple cuda kernel. But in case we just need the raw vertex data after the transformation, this would be doubled work, since the gpu does it anyways when the screen has to be refreshed.

So: is it possible to copy the vbo data after a certain step of the graphics pipeline?

Hope for interesting answers,

snowball :)