I am implementing a simple ray tracer with OpenGL. I have a shader storage buffer with all the triangles so I can test them for intersections in a compute shader. It works fine up to a certain buffer size. But if I have more than a certain amount, it stops working and I get the following message:
OpenGL: Buffer usage warning: Discarding a video memory only buffer object. The data store will be reallocated on next usage of the buffer object.
The program does not crash however.
GL_MAX_SHADER_STORAGE_BLOCK_SIZE is 2147483647, so 2GB. The size of the buffer when it doesn't work anymore is just a couple of MB, around 6 to 7 MB.
Am I overlooking something? Are there other limits I don't know about?
My specs: Linux Mint 17.2, GTX 980Ti with 6GB of VRAM