Skip to content

mesa: optional queries

Erik Faye-Lund requested to merge kusma/mesa:st-optional-queries into main

In OpenGL, it's legal to support zero bits for both occlusion queries and pipeline statistics queries.

We already took advantage of this for ARB_occlusion_query, but we stumble a bit because we end up trying to create invalid queries if an application tries to use them.

This MR fixes that issue, and hooks up the same logic for ARB_occlusion_query2 and ARB_pipeline_statistics_query. This results in lighter requirements for Zink, which is especially useful on mobile hardware.

This only enables the core functionality, the ARB_occlusion_query2 and ARB_pipeline_statistics_query extensions are not exposed without hardware support.

Edited by Erik Faye-Lund

Merge request reports