Hey, I’m currently in a similar situation as described here where we are currently doing the following:
- Writing to the VBO pointer via memcpy after using glMapBuffer on a background thread using a background OpenGL context. We are also uploading some textures on this background thread as well.
- Performing essential rendering functions (i.e. glDrawElements, rendering to color/depth/stencil buffers, etc.) on the main thread.
Sometimes, we get crashes because of this memcpy, which happens either because of two reasons:
- The VBO pointer we obtain is corrupt
- Some of the locations where we plan to write to the VBO array are corrupted
Do you know of a situation in using glMapBuffer where crashes can happen because of the driver itself? I’m stuck trying to figure out if this is a threading issue from our side or not, but I’m not convinced by this because this can happen randomly when nothing rendering related is happening on the main thread.
As you can imagine, this is hard to reproduce and can only be reproduced when all optimizations are on.
Keep in mind I’m using OpenGL 2.1 and an NVIDIA GeForce GTX 1060 6GB. I don’t know if this is NVIDIA specific or not, but I’ve included my card here anyway.
Thanks so much for any help you can provide in advance!