1
votes

I have encountered a weird problem: I have a fragment shader containing several uniform variables (mat4, vec4), a single sampler2D and a gigantic SSBO (1GB-2GB). For each type of variables, it does not exceed the size limitation of the hardware. Without the SSBO, the shader works fine. With the SSBO, if the resolution of the texture image is low (768x768x4 float), the shader works fine too. However, if the resolution goes to 1024+ x 1024+, the program instantly crashes inside NVIDIA driver. I have tested it on GTX980 Ti and Quadro P5000. This problem all happened.

I wonder if there are any limitations on the usage of shader resources.

1
This is the same as asking for dealing with RAM limits in CPU, with the difference that there's no swapping-disk. A texture must fit into GPU RAM or else parallelism goes away (read: crash or no drawing). I'm sure you can find a way of breaking your data into pieces and send them consecutively to the GPU.Ripi2

1 Answers

0
votes

According to this database of OpenGL implementations, there is no implementation that permits an SSBO to be being more than 2GB in size. That is, no implementation has GL_MAX_SHADER_STORAGE_BLOCK_SIZE greater than 2GB.

Note that Vulkan implementations are not much different. AMD implementations offer 4GB SSBOs, but they still have limitations that are separate from the amount of storage they have.