vrend: check for support of occlusion queries and emulate some
On GLES ARB_occulsion_query is not available but GL_EXT_occlusion_query_boolean might be. In this case emulate GL_SAMPLES_PASSED by using GL_ANY_SAMPLES_PASSED. This may be enough in most cases e.g. it helps with the piglit: nv_conditional_render-blitframebuffer
In addition, scale up the binary result by a factor of 1024 so that clients that use a threshold on the value returned by GL_SAMPLES_PASSED to discard objects don't discard objects based on the "one" returned by GL_ANY_SAMPLES_PASSED.
Signed-off-by: Gert Wollny gert.wollny@collabora.com
Edited by Gert Wollny