Hi,
I started going through an OpenGL tutorial I found on the internet. vertex shaders and fragment shaders work fine and reading the OpenGL4.6 specs I realize I can start compute shaders as well. My compute shader updates coordinates in a world which it can then draw onscreen. There are lots of calculations and I use only one of the GPU's streaming processors , i.e. the job is started with:
glDispatchCompute(1,1,1);
It takes about 0.3 seconds for the job to complete and update the world one simulation step and this is repeated in a loop. In a completely separate process, I'm playing a video. While my opengl simulation job is running, that video drops to 3 fps. If I try to move around a window with the mouse, that also updates at 3 fps, as if my simulation used up all gpu resources and other processes are only let in between calls to glDispatchCompute. However, the gpu has 34 streaming processors and the simulation is only using one.
Is there some opengl function one can call to enable sharing of gpu resources with other programs on the machine?
(Ubuntu Linux using Nvidia's proprietary driver)