Ah yes, thanks! And if we manually create a min/max RG32f mip-chain (R=minZ, G=maxZ), with a simple texture-fetch on a given LOD we can query arbitrary-sized bounding-spheres. Tens of thousands of queries being executed in one draw-call this way :D.
No need for the queries to share instance mesh info, thus the whole scenegraph can be queried. Provided that some rough depth was pre-laid (I do this currently in my code; anti-portals might be the term).
Generally the query results will be <20k in count, so a simple VBO readback gpu->cpu won’t be problematic, especially if packed as a bitfield. Further curable by GL4’s indirect-draw commands.
Bounding spheres can give too many false positives, but the manual visibility testing can be easily extended to do triangle vs Z-plane intersection for complex custom bounding volumes, if necessary.
Existing occlusion queries are proving a bit of a bottleneck for me even with perfect pipelining (rasterization of many triangles, that cover 100k-1M pixels of the screen), and CHC++ doesn’t look like a solution, so this piqued my interest.