This is an interesting question: Is it possible to query a timestamp and in doing so, determine if vertex/fragment shaders should return prematurely, thus rushing to the end of the drawcall if a particular time has elapsed? Put another way, can we use a timestamp to somehow short-circuit a submitted draw call? For example, could we issue millions of instances in a call and 'end' the call (read a timestamp in shader) when we got to, say, 14ms, thus keeping the rendering time to 60fps?
Would the workload have to be split into batches and the "time query" have to be done prior to issuing each call?
Sean
It has been brought to my attention that while glFlush will work, it incurs very large bandwidth consumption penalty (if writing to one frame) due to having to repeatedly read/write the FBO to memory. The steep cost may (very likely) offset the benefits of incremental rendering to maximize workloads. Use of glFlush has thus been discouraged, and understandably so given this consequence. Of course, this is not the case if you are writing to different buffers.
To optimize for memory, the developer may consider using small sections of FB at a time, to exploit spatial coherence to maximize caches. Outside of that, it may be worth looking to the GLES 3.1 compute shader to implement these edge cases, even if they mean re-implementing certain aspects of the GL pipeline.