Closed doug-moen closed 6 years ago
Works for me. Fixed in my fork of glslViewer.
The original fix was to add a 10ms delay before calling glfwSwapBuffers(). I've removed that delay, and I now rely on calling glfwSwapInterval(1) while initializing the OpenGL context. I finally tested this change on the original machine and OS used to create this bug report. Curv no longer freezes the GPU, and the change works. The effect of calling glfwSwapInterval(1) on my test machine is to limit the frame rate to 60 FPS. Previous to this change, there was no effective upper limit on the frame rate, other than what was provided by the 10ms delay.
I switched my Ubuntu system to Intel graphics. Shadertoy seems to work, so do the glslViewer examples.
3D Curv programs work. Many 2D programs crash or freeze the GPU (requiring a reboot), including 'square 1' and 'circle 1'. But smoke.curv works.
Okay, this looks like an issue with glslViewer. Here's the shadertoy.com "hello world" program:
void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord.xy / iResolution.xy; fragColor = vec4(uv,0.5+0.5*sin(iGlobalTime),1.0); }
This program runs fine on the shadertoy.com website, inside Firefox. But give the same program to glslViewer and we need to reboot. The problem, apparently, is that glslViewer runs shader programs at max frame rate, with no throttling. If the shader program is too simple and fast, then BOOM.