Hi all,
for some specific uses, I am doing buffer orphaning of the element buffer object. The main thing I am doing is this:
Orphan the EBO (glBufferData(ebo, size, nullptr))
For each object group
For each object in group
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, index_size, data);
glDrawElements(...)
This works wonderfully on nVidia graphic cards.
But unfortunately on AMD cards (Linux, free drivers), the screen is flashing (it is as if I have only some part of what I am sending each 2 or 3 frames).
Are any of you aware if buffer orphaning is something that we can do on AMD and Intel ? Or are you aware if on AMD and free drivers on Linux this is supported by the driver ?
According to this, this looks to be implementation dependant (but information might be outdated):
One issue with this method is that it is implementation dependent. Just because an implementation has the freedom to do something does not mean that it will.
I actually would prefer to avoid using mapping since this does not apply well with our current architecture, for some reasons: this would lead in copying our temp buffers into the mapped buffer, then this mapped buffer would have to be unmapped so data are sent to GPU. And since many threads are doing calculations, and that the number of indices differs frame to frame for each object.
Other questions: I haven’t tested that yet since this would imply to use more memory, but would doing a circular data writing/using worth to try ? What are the current state of the art for streaming nowadays ?
For information, this was tested on:
Linux, nVidia Geforce 1060 GTX
Linux, AMD Rx 580, free drivers (POLARIS10, DRM 3.27.0, 4.19.0-1-amd64, LLVM 7.0.1)
Thank you in advance. Regards.