Skip to content

mesa: Add values to PIPE_CAP_OCCLUSION_QUERY

What does this MR do and why?

PIPE_CAP_OCCLUSION_QUERY currently conflates queries that require hardware counters (e.g. PIPE_QUERY_OCCLUSION_COUNTER) and those that only require a flag (e.g. PIPE_QUERY_OCCLUSION_PREDICATE).

Giving this cap an integer value allows specifying any of the following:

    0 -- No occlusion queries are supported,
    1 -- Only non-counter occlusion queries are supported (e.g.
         PIPE_QUERY_OCCLUSION_PREDICATE), or
 >=32 -- Occlusion queries with counters are additionally supported
         (e.g. PIPE_QUERY_OCCLUSION_COUNTER) with the precision
         specified by this value.

The separation allows backends to expose GL_EXT_occlusion_query_boolean for OpenGLES without needing the hardware counters required for GL_ARB_occlusion_queries. This split is implemented in zink, with a FIXME comment in other drivers where it may be possible to make a similar distinction.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>

Merge request reports

Loading