Improving GL_ARB_occlusion_query

Sometimes one want to know if the number of visible fragments exceeds a certain threshold (for example 0 to test if at least one pixel of an object is visible). This kind of query could be implemented more efficiently by drivers than first counting all visible fragments of an objects (even beyond the given threshold)…

Sometimes one want to know if the number of visible fragments exceeds a certain threshold (for example 0 to test if at least one pixel of an object is visible). This kind of query could be implemented more efficiently by drivers than first counting all visible fragments of an objects (even beyond the given threshold)…
Not really. The driver still needs to read the value back from the card in order to do the compare. Or, if the compare is done it hardware, it needs to read the result. In either case, the value being read is stored in a GPU register. So they take the same quanity of time to access. The actual comparison is negligable in time to do on the CPU, so that’s where it should go.

And the card still needs a counter to determine if it has reached this value. Indeed, for the GPU to do the computation, it needs 3 registers rather than one: a counter, a register for the result, and a register to store the number to compare it to. Better to use the current method, which only requires 1 register.

The readback time is the same, but the value/result will be available earlier, so the waiting time could be reduced.

And you are argueing that a new feature/improvement could cost some silicon; you will never new features than…