So the underutilized boolean and counting occlusion queries look ideal for predicated rendering given no API support. This should work for 5s and above.
One thing that would be useful as an extension to occlusion
generate a set of indexes in an instance buffer
have occlusion query write an 8-byte value to that indexed buffer location
read the buffer location from each instance.
in vertex shader, lookup buffer value at index, and vertkill all instance vertices if 8-byte value is 0
One thing that would be useful as an extension to occlusion
only write 0, and not any positive values to knock out instance counts.
be able to write to 4 bytes instead of 8 to knock out ICB values
being able to submit instanced boxes with queries on each one. The current queries require a scoped draw per box which is a lot of commands submitted