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
Thanks bradgrantham!
Your answer is very welcome, tremendously useful, and very enlightening. I was unaware of the IMG_context_priority extension (which I assume Mali supports) which seems tremendously useful -- Thank you!. You are correct that this isn't exactly what I had in mind, but if the implementation is reliable, it can stand in and produce the same results as a full-cancel under many circumstances, and with a potentially more straight-forward implementation. I am very grateful for the suggestion, and will be thinking as to weather this will suit my needs -- I suspect it might!
I haven't started my graphics project just yet but will be targeting Samsung's Gear VR hardware which implies Mali and potentially Adreno. I'm really excited to get started!