mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
etnaviv: query: reset sample count on begin_query
ARB_occlusion_query specifies that the query is reset on BeginQueryARB,
not when the fetching the result of the query. This behavior also makes
a lot of sense for the perfmon queries.
CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23557>
(cherry picked from commit b6a4b988ab)
This commit is contained in:
parent
880f738823
commit
3ea2976e87
2 changed files with 2 additions and 4 deletions
|
|
@ -2461,7 +2461,7 @@
|
|||
"description": "etnaviv: query: reset sample count on begin_query",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ etna_acc_begin_query(struct etna_context *ctx, struct etna_query *q)
|
|||
|
||||
/* ->begin_query() discards previous results, so realloc bo */
|
||||
realloc_query_bo(ctx, aq);
|
||||
aq->samples = 0;
|
||||
|
||||
p->resume(aq, ctx);
|
||||
aq->samples++;
|
||||
|
|
@ -146,9 +147,6 @@ etna_acc_get_query_result(struct etna_context *ctx, struct etna_query *q,
|
|||
void *ptr = etna_bo_map(rsc->bo);
|
||||
bool success = p->result(aq, ptr, result);
|
||||
|
||||
if (success)
|
||||
aq->samples = 0;
|
||||
|
||||
etna_bo_cpu_fini(rsc->bo);
|
||||
|
||||
return success;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue