Hi, I'm coding the mechanism to get the data from gpu buffers back to cpu side ( https://bugreports.qt.io/browse/QTBUG-57727) and I have different ideas on how to do this, so I want your opinion.
The first idea is follow the QRenderCapture idea: An object in the framegraph which creates a reply object in which the buffer content will be. The buffer which you wanna download will be setted in the QBufferCapture class (or maybe a vector of QBuffers) The reply object sends a complete signals to know when the backend has finished the job. This is easy but I think it has some drawbacks. First of all, you'll need or several differents QBufferCapture objects in the framegraph for different buffer (or a vector in the QBufferCapture object). I think this is a horrible way of specifying the buffer you want to get as you can lost control of which QBufferCapture object is downloading which buffer. My second idea is to specify a QBufferCapture class but this class only sets a flag (download the contents or don't download the contents). I will add a property to the QBuffer class to specify if that specific buffer must be downloaded or not. When the renderview has a QBufferCapture object, it will ask if it must download the contents for that specific frame, and if it should, each QBuffer which must be downloaded will create a job to get the GPU data and transferred it to the cpu side. The QBuffer will be in charge of sending a signal to notify that the content is ready. The downloaded data will probably be stored in the QBuffer object (I still have to think about this). The last idea is a simplification of the second idea. The QBufferCapture class will disappear and the renderview will consider that the user always wants the data. The QBuffer will still have the download/not download flag to specify if that specific buffer must be downloaded. To be able to code this completely, I will need some help to fully understand how Qt3D works. I'm mainly interested in synchronization stuff. My main worry about this is what happens when a renderview has submit all the download jobs. Is it possible that while I'm still downloading the buffer contents, another renderview begins rendering and writes on the gpu buffers that I'm still downloading? Or does renderviews do things in a completely serialized manner? Thanks!
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest