mesa: support dummy queries for ARB_pipeline_statistics_query
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 15 Nov 2022 12:18:16 +0000 (13:18 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Nov 2022 06:50:59 +0000 (06:50 +0000)
commit2906c468c13ec6a792b0ab4d0c47fcfaddd3d49a
tree6fdafb66eb93f8c893171d7a01da480ad070510b
parent1b1e8873fe90e878f014140b3b6bd1e5dbfb5a4c
mesa: support dummy queries for ARB_pipeline_statistics_query

Similar to ARB_occlusion_query / ARB_occlusion_query2, this extension
allows zero bits for the queries, meaning there's no actual hardware
requirements here.

So let's just report zero bits if the driver doesn't support the CAP,
and treat these queries as dummies like we already do for occlusion
queries.

We still don't expose the extension, this is just to make it possible to
allow the core OpenGL functionality without exposing the extension.

Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19750>
src/mesa/main/queryobj.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_context.h