Well, i have been running in a couple of these issues recently. First of all, I’d like to mention, this one is different from the infinite loop issues in shaders, which also provocate black screens. (I have experienced these also and they were my fault).
Here, i have a fraps counter displaying realtime framerates, the application still responds, but the screen remains desperatelly black.
Error logs are empty, no (syntaxical) errors are found in the shaders, and there isn’t a single warning (i’m using GLSL 120, by specifying #version 120).
The first case where this happened was when i had to refine a minima extraction on a function with something like a bijection. I did my nice function, which was called only once. And i was running into this issue.
What i did to fix it is to copy paste the code in the caller function… Not a single line of the algorithm changed and then just like magic, it worked.
But now i’m running into a similar issue again… So i start to wonder about the drivers. I’m trying to code something like packet tracing for raymarching on GPU. Typically I’d like to trace a bundle of 16 rays, in order to reduce the number of distance function evaluations. I’ll output the intersection t in a bundle of 4 rgba float32 rendertargets… which is the max allowed as far as i recall. (I’d like to try larger sizes also but i’m limited by the API or hardware here it seems…).
I don’t really know what to do with these issues. It is also probable that with the latter example i have a stupid bug somewhere also… I’ll try to solve it. But still, if “copy paste in the caller function” is the solution there must be something wrong in the driver isn’t it?