Am 08.04.2016 um 02:11 schrieb Marek Olšák: > From: Marek Olšák <marek.ol...@amd.com> > > --- > src/gallium/auxiliary/cso_cache/cso_context.c | 4 ++++ > src/gallium/auxiliary/cso_cache/cso_context.h | 1 + > src/gallium/auxiliary/hud/hud_context.c | 1 + > src/gallium/auxiliary/postprocess/pp_run.c | 1 + > src/gallium/auxiliary/util/u_blit.c | 1 + > src/gallium/auxiliary/util/u_blitter.c | 4 ++++ > src/mesa/state_tracker/st_cb_clear.c | 1 + > src/mesa/state_tracker/st_cb_texture.c | 1 + > 8 files changed, 14 insertions(+) > > diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c > b/src/gallium/auxiliary/cso_cache/cso_context.c > index 790e121..4e0cbdd 100644 > --- a/src/gallium/auxiliary/cso_cache/cso_context.c > +++ b/src/gallium/auxiliary/cso_cache/cso_context.c > @@ -1539,6 +1539,8 @@ cso_save_state(struct cso_context *cso, unsigned > state_mask) > cso_save_vertex_shader(cso); > if (state_mask & CSO_BIT_VIEWPORT) > cso_save_viewport(cso); > + if (state_mask & CSO_BIT_PAUSE_QUERIES) > + cso->pipe->set_active_query_state(cso->pipe, false); > } > > > @@ -1590,6 +1592,8 @@ cso_restore_state(struct cso_context *cso) > cso_restore_vertex_shader(cso); > if (state_mask & CSO_BIT_VIEWPORT) > cso_restore_viewport(cso); > + if (state_mask & CSO_BIT_PAUSE_QUERIES) > + cso->pipe->set_active_query_state(cso->pipe, true); If some state tracker would use set_active_query_state directly, you'd have to save/restore the actual state.
The gallium interface looks ok to me, I can't remember what the arguments were about using something along these lines or rather just have it per draw. Not sure which one would have less overhead neither... You should get some more feedback from other driver's authors but otherwise Reviewed-by: Roland Scheidegger <srol...@vmware.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev