6
$\begingroup$

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.

The 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?

Edit:

My specs: Linux Mint 17.2, GTX 980Ti with 6GB of VRAM

$\endgroup$
  • 1
    $\begingroup$ That's just a warning that the vram is getting over-committed and could cause more memory transfers. $\endgroup$ – ratchet freak Feb 11 '16 at 11:06
  • $\begingroup$ @ratchetfreak: That's just a side effect then? I still don't understand why the program stops working though. $\endgroup$ – gartenriese Feb 11 '16 at 17:08
  • $\begingroup$ Can you share OS + GPU details? $\endgroup$ – Daniel M Gessel Feb 12 '16 at 2:19
  • $\begingroup$ @DanielMGessel: Yes, I am using Linux Mint 17.2 and my GPU is a GTX 980Ti with 6GB of VRAM. $\endgroup$ – gartenriese Feb 12 '16 at 17:00
  • 1
    $\begingroup$ @Andreas: No, they are not limited to 16MB. 16MB is the minimal size it is guaranteed to have. Usually they are limited to VRAM. If you look at my question I already checked the size with GL_MAX_SHADER_STORAGE_BLOCK_SIZE and it's 2GB (which isn't actually my VRAM size, but still big enough). $\endgroup$ – gartenriese Apr 11 '16 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.