7
$\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$
16
  • 1
    $\begingroup$ That's just a warning that the vram is getting over-committed and could cause more memory transfers. $\endgroup$ Commented Feb 11, 2016 at 11:06
  • $\begingroup$ @ratchetfreak: That's just a side effect then? I still don't understand why the program stops working though. $\endgroup$ Commented Feb 11, 2016 at 17:08
  • $\begingroup$ Can you share OS + GPU details? $\endgroup$
    – user2500
    Commented Feb 12, 2016 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$ Commented Feb 12, 2016 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$ Commented Apr 11, 2016 at 9:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.