etnaviv: Pass context to acc sample provider supports(..) function

Extend the supports(..) function signature in acc sample providers
to accept an etna_context parameter, enabling GPU feature validation
during query type support checks.

This change prepares the infrastructure for query providers to make
context-aware decisions based on available GPU capabilities.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
This commit is contained in:
Christian Gmeiner
2025-08-08 11:50:13 +02:00
committed by Marge Bot
parent ebd5504f73
commit bbac6a8b53
4 changed files with 4 additions and 4 deletions
@@ -161,7 +161,7 @@ etna_acc_create_query(struct etna_context *ctx, unsigned query_type)
for (unsigned i = 0; i < ARRAY_SIZE(acc_sample_provider); i++) {
p = acc_sample_provider[i];
if (p->supports(query_type))
if (p->supports(ctx, query_type))
break;
else
p = NULL;
@@ -34,7 +34,7 @@
struct etna_acc_query;
struct etna_acc_sample_provider {
bool (*supports)(unsigned query_type);
bool (*supports)(struct etna_context *ctx, unsigned query_type);
struct etna_acc_query * (*allocate)(struct etna_context *ctx, unsigned query_type);
void (*resume)(struct etna_acc_query *aq, struct etna_context *ctx);
@@ -46,7 +46,7 @@
*/
static bool
occlusion_supports(unsigned query_type)
occlusion_supports(UNUSED struct etna_context *ctx, unsigned query_type)
{
switch (query_type) {
case PIPE_QUERY_OCCLUSION_COUNTER:
@@ -93,7 +93,7 @@ pm_query(struct etna_context *ctx, struct etna_acc_query *aq, unsigned flags)
}
static bool
perfmon_supports(unsigned query_type)
perfmon_supports(UNUSED struct etna_context *ctx, unsigned query_type)
{
return !!etna_pm_query_config(query_type);
}