diff options
author | Christian Gmeiner <[email protected]> | 2019-05-28 21:43:51 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2019-06-04 14:58:02 +0200 |
commit | a6e879984cb7a5c22f25da47b82ba23800af32b2 (patch) | |
tree | 863ca5b2b329117b5eccfc3cff8da327ae60fbfd /src/gallium | |
parent | 8a35eb0602735194f2976000ddff9dca2c8b5741 (diff) |
etnaviv: implement set_active_query_state(..) for hw queries
Clear w/ quad uses a normal draw which adds up to OQ. st/meta
uses set_active_query_state(..) to tell the driver to pause
queries in such cases.
Fixes spec@arb_occlusion_query@occlusion_query_meta_save piglit.
Signed-off-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_query.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c b/src/gallium/drivers/etnaviv/etnaviv_query.c index b076e87e782..bd75ca90b8a 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query.c @@ -134,8 +134,17 @@ etna_get_driver_query_group_info(struct pipe_screen *pscreen, unsigned index, } static void -etna_set_active_query_state(struct pipe_context *pipe, boolean enable) +etna_set_active_query_state(struct pipe_context *pctx, boolean enable) { + struct etna_context *ctx = etna_context(pctx); + + if (enable) { + list_for_each_entry(struct etna_hw_query, hq, &ctx->active_hw_queries, node) + etna_hw_query_resume(hq, ctx); + } else { + list_for_each_entry(struct etna_hw_query, hq, &ctx->active_hw_queries, node) + etna_hw_query_suspend(hq, ctx); + } } void |